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.

How to show party member's names in a choice?

Alright, so I know how to show a character's/actor's name as a choice option according to their position in the database (\n[database position]), but how would I make the choices be the names of only the characters currently in the party? For example, an event that, when called, asks "which of the current party members should wait here?" and then proceeds to have each of the 4 choices be the names of the members of the party.

Any help is greatly appreciated!
 
this doesn't have nothing to do with your last question:
have you tried removing actors not from the start but by an event and then show the choices?
does the actor(s) you removed still appear in the choices?

about your last question:
you would have to check the index of the command_window in the script.
 
Glad we could help TheRealDeal!

And for your last question, the code would be:

$game_party.remove_actor(X)

X is the ID of the actor

And MarioSuperStar, are you talking about a window or a "Show Choice" command.
 
Dang, I think I should explain myself better. What I really want to do is have the player select which actor from the current party they want to leave behind/ place on a map (what we just solved), and then create an event with that character’s corresponding sprite at that location to intercept enemies. The last part is easy enough to do, but being able to tell which actual character has been selected and then call an the event or sprite for that specific character is ultimately what I’m try to do. Example: the third party member in the player's particular party configuration is Aluxes. That player chooses to leave Aluxes behind. After choosing to do so, Aluxes's sprite/event is generated at that location.

Does that make any sense?
:huh:

@MarioSuperStar: Yeah, I did try adding through an event and it still happens.

I feel like I should be paying you guys ;)
 
http://imageshack.us/photo/my-images/807/unledoxr.png/

There's a screenshot of the added content. What you need to do to get this event to work under each choice, add this code:

Code:
actor = $game_party.actors[X].id

$game_party.remove_actor(actor)

$game_switches[Y] == true

However, for each choice you need to change the X and Y values. X should be 0 for the first choice, 1 for the second choice, and so on.

For Y, I made it so that it turns on a game switch (sorry for making you use all your switches and variables lol). You need to change Y to four different values for each choice and they also have to have been unused switches. Then the rest is up to you. After the switch is turned on, you can add a new event page to a separate event that makes the graphic visible, or something like so.

Hope this helps!
 
I see where you're going with that, but then I think it still wouldn't necessarily associate the character choice selected with the proper event.

Say the 3rd party member is named "The Scripter". Also, somewhere on that same map, there is an event also named The Scripter that by default isn't assigned a graphic. However, when called, the graphic changes to the sprite of The Scripter actor and moves to where the player is. There are 3 other events just like this one also on the map (for the remaining 3 party members).

When the choice is presented to the player, the third option will, thanks to your help, display "The Scripter" for the name. Now, under that choice, I can set a variable to a value that would trigger "The Scripter" map event to do what was described above. But the problem is that "The Scripter" may not be the 3rd party member; maybe he's in the lead, and his name would be displayed first. In that case, if the player chose the character in the 3rd slot, it would still be "The Scripter" event that's called. Essentially, I don't know how to check to see which name has been selected. In regular programming, it would look something like (pseudo code):

string theScripter = "The Scripter"
string selectedCharacter = ""


selectedCharacter = Players' selection from choice menu

If string selectedCharacter = theScripter
Move "The Scripter's" event
.....
.....


But I'm not sure how to do this with RMXP tools. I've much to learn :huh:
 

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