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.

Events responding differently to leaders of the party

Razior

Member

Is there a way to make events respond to the current leader of the party and how.

For Example. When Character_1 speaks to Event_A event a will talk to them. If Character_2 is made leader and tries to speak to Event_A, Event_A ignores them.
 

Kipe

Member

Just use a Variable and change it whenever you change the Party leader.
Whenever you change the party leader you'll need to:
Control Variables: [Party Leader] ==(set to) 2
or
Control Variables: [Party Leader] ==(set to) 3
etc.

For the guy that you're talking to, make Conditions for each Party Member.

Conditional Branch: (if) Variable: [Party Leader] == 1
Show Text: Hi.
else
Conditional Branch: (if) Variable: [Party Leader] == 2
Show Text: Go away.
else
etc.
 
You could also use a script as a condition in a conditional branch.

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

Here you'd have to set the y to 0 for the leader of the party and x as his ID inside the database.
That way you wont have to use variables, though that would work as well.

Hope this helps

~Dalton~
 

Razior

Member

Thank both of you so much. I will definitely try both methods.

Edit: I have managed to do both. I put the script into my on-map party switcher and registered it to a game variable. Thanks again.
 

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