PyWright Wiki
Advertisement
CropperCapture-33-

The final product.

If you've ever tried to use a char command and then show an investigation menu, you'll notice that the character doesn't show up once the menu is brought up. This might be fixed in later versions of PyWright, but here's my temporary solution.

Solution[]

Take the character you want, in a normal pose. Copy it and paste it into GameName/CaseName/art/bg (or just in your game's art/bg folder, but this way is much cleaner.) We'll use Maya, and name the new file "MayaNormal.png".

Make sure you also copy the animation TXT, and now let's change it. Add this at the end of it:

framedelay 0 30
framedelay 8 30

This will stop her from blinking uncontrollably.

Now, before you bring up the menu, make sure your script has this in it:

label Show_Menu

bg phoenixoffice

bg mayanormal stack nowait

bg main2 y=192 z=2 stack



localmenu examine=$examine move=$move talk=$talk present=$present

The label is just for the menu, so don't focus on that right now.

The background we want, we load first. In this case, we are using Wright & Co. Law Offices.

Next, we load the 'fake' character pose as a background, while stacking it and using nowait so the animation doesn't freeze anything up.

Last, we load the bottom screen's investigation background, using "y=192" to put it at the bottom, and make sure you use "z=2" and "stack" so that it goes on top of the other backgrounds.

The localmenu is just our menu, don't focus on that right now.


Next, we want to get rid of the fake character when the real character starts to talk.

EXAMINE:

label examine
bg phoenixoffice
examine fail=nothingthere
goto Show_Menu
region 103 91 41 99 plant
label plant
char Phoenix hide
"Plant."
goto examine
label nothingthere
char Phoenix hide
"Nothing."
goto examine

We should load back up the background, and then there's a quick examine code, just to test it. Maya will disappear from both screens while we examine, and then reappear when we finish examining.


TALK:

label talk
bg phoenixoffice
bg mayanormal stack nowait
list talktomaya
li Example 1
li Example 2
showlist
goto Show_Menu
label Example 1
bg phoenixoffice
char Maya
"This is example 1 with Maya's default animation."
goto talk

label Example 2
bg phoenixoffice
char Maya e=thinking
"This is example 2 with Maya's thinking animation."
goto talk

We show the the two backgrounds except our bottom screen one, and then a list. When a list selection is made, the background is now just changed to the background we wanted, and we load up the real Maya, and she talks. When we press back, it'll go back to the main investigation screen with Maya again.


MOVE:

label move
bg phoenixoffice
bg mayanormal stack nowait
list movemenu
li Example
showlist
goto Show_Menu

label Example
script Newscript

Nothing really special here, it'll show a list like usual and then when one is picked it'll go to that script.


PRESENT:

label present
bg phoenixoffice
bg mayanormal stack nowait
present fail=noevidence
goto Show_Menu
label badge
bg phoenixoffice
char Maya
"I like that badge.{n}Can I have it?"
goto present
label noevidence
bg phoenixoffice
char Maya
"I don't know what that is."
goto present

We load the two backgrounds as usual, and then load the present command. Not going to go into detail here. (Make sure you have evidence named "badge" so you can properly test it.)

And, that's it. You should now have a functional investigation menu, with a displayable character with the menu.

Preview[]

Here's a preview with the scripting above combined:









The process is very similar with other characters and then using foregrounds such as the detention center, so it shouldn't be too hard to implent this throughout your game. Thanks for reading!

Advertisement