Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Actor Graphics in a Cutscene, Anyone?

Okay, so here's the mess I've gotten myself into now. In my latest game project, I would like my cutscenes to run so that your main player is accompanied by the other three members of the party. I don't need them to move or play the game or anything, I just need them to be controllable events for cutscene purposes that can be dismissed when the gameplay resumes, like any other NPC would be. Normally, you could set an event with a player graphic, and all would be fine and peachy, right?

Here's my problem. In this particular game, players are able to choose their party from a very wide array of characters, so there's absolutely no way of knowing who the other three members of the party are.

Is there anything - a programming trick, a script, whatever - that might be able to help me rig the events so that their graphics correspond to actors 2, 3, and 4 of the player's chosen party? I'm sorry if this has been asked before, but I've looked just about everywhere, not to mention tried a hundred of my own newbie concoctions that gave me no result whatsoever. If I could get any help at all on this problem, it's be very greatly appreciated. :biggrin:
 
hm,
how about setting delicious variables?

in the beginning of the game, while making the user choose party members,
accompany the selections with setting variables for each character chosen.
for example, you have 10 selectable party members. You can set one
variable for each character, or you can use 1 variable with different values
to reduce space.

You can do this with events.
variable1 = Josh
variable2 = aaron
variable3 = Grandpa
variable4 = etc
...

OR

variable1 = 0 #first character
variable1 += 1
variable1 +=2
...

Now, when 1 character is selected and added to the party, the variable
is active, thus, activating the NPC event you want.

Its basically setting a variable constant into the value of the selected character.
constant will be 1 if josh is selected
constant will be 2 if aaron is selected

Now, in the cutscene, make events that check if which variable has been set OR
IF the variable was at the constant 0,1,2, etc...
you can do this by checking the EVENT CONDITIONS of the event, or a
CONDITIONAL BRANCH...

I love you Conditional Branch!
Anyway, if you need more info, tell.
 
Another option would be a conditional brach with a script as condition.
The script in question would be


If $game_party.actors[y].id == x

Where y is the position in the party (0-3 or rather 1-3 for actors members 2, 3 and 4) and x being the ID inside the editor. So if you would be checking for Actor 23 being in slot 2 it would be


If $game_party.actors[1].id == 23

Then use change graphic accordingly.

Hope this helps

~Dalton~
 
Bingo! Thanks, Dalton - the script gave me EXACTLY what I needed. <D I owe you one, dude, even though I have no way of repaying it, because I'm a complete idiot when it comes to this program, but come find me anyway if you need it. :D

((I'm sure the other one works, too, if used correctly, just...variables and I aren't friends. :P))

So yeah, thanks for all the help, everyone, this board is resolved, all that happy muffin time. :D
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top