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.

Displaying current party leader's name? [resolved]

I already know that \n[#] will display the name of the corresponding actor's ID.

But what if you're game allowed you to change your party at will?
How would I automatically display the name of the party's leader?
 
It worked for me!

So, for instance, let's say you choose variable 22 as your example. If Hero 4 is the leader, change variable 22 to 4. Then, where you want the name, write \n[\v[22]], which comes out as \n[4], which is hero 4's name!
 
Place this in a script call. Because you may not know which actor is the leader.
Code:
$game_variables[id here] = $game_party.actors[0].name
Now in a Show Text use \n[\v[id here]]
 
Dachimotsu":2s1ef7y1 said:
@game_guy: I don't know how to use what you just provided. Do I put that in the script editor or the Call Script event, or both? I need a more detailed explanation.
Use it in a call script, replacing id here with the variable id, before you display the name. Or use my method by changing a variable whenever the front party member gets switched.
 

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