DISPLAY PHOTO FOR RANDOM CHARACTER

Posts

Pages: 1
I would like to show my characters photo on the side of the text string when they talk. Because I have in-game character selection, the character photo needs to be different depending on which character is being used. Is there a way to choose the photo based on a variable, or by some other way besides manually selecting it?
Which engine? But yes, you can. You need to make a common event that you can call when you write dialogue for that character.

Basically you want to create a bunch of conditions where IF x is in party, then show x image, etc.

Here's what I did to create something like this in Ace (it should work in most other RM engines, though).

Made a common event that has all of the faces that could be picked. Now, in the case that the other characters can later be added to the party, you can change out the check for if hero is in party to instead a variable check, but from the sounds of it it's just one character that can be picked.



Then in the event where you have dialogue just have this:


The beauty of this system is that it turns itself on/off before/after a message. You set it up and that's that. If you later want to add more characters to choose from, you just edit the common event and done.


Basically it does this:
- calls the common event.

- If the switch is turned OFF it checks which character is in the party
- Shows the picture assigned to that character
- Turns the switch ON
- Jumps to the bottom of the event (thus bypassing the next piece of eventing)

- If the switch is turned ON, it erases any image that was shown
- Turns the switch OFF
- Jumps to the bottom of the event (thus not looping to the top and bypassing any other eventing)


Each time you call the common event it does the check for which direction the switch is in (off or on) and changes it's directions based on that. Simple but effective.
Pages: 1