How to create a choice of races for an RPG?
MikeOmega
22 Aug 2012, 16:59I know it can be done, but at the moment, I'm not quite sure how to do it. I would like for the game to provide a pop-up menu at the beginning of the game asking you to select a race from a list by clicking on it. When you select the race, the window closes and it applies attributes of that race to the player. How do you set up the race to choose from in the editor, say "Human" and "Elf" with just basic attributes such as "health", and then run a script to make a selection and apply the attribute to the player?
The Pixie
22 Aug 2012, 18:50Like this:
Set up a stringlist on the game object, which is a list of options. Then create a start-up script that uses the "show menu" command to display a menu. In a script block following that, check each option against the result variable.
Set up a stringlist on the game object, which is a list of options. Then create a start-up script that uses the "show menu" command to display a menu. In a script block following that, check each option against the result variable.
MikeOmega
22 Aug 2012, 19:47The Pixie wrote:Like this:
PlayerRace.aslx
Set up a stringlist on the game object, which is a list of options. Then create a start-up script that uses the "show menu" command to display a menu. In a script block following that, check each option against the result variable.
Thank you very much! This makes sense now!
The Pixie
24 Aug 2012, 22:25By the way, if you have several questions, then each must go inside the previous block.
msg ("Let's generate a character...")
msg ("First, what is your name?")
get input {
player.alias = result
msg ("Hi, " + player.alias)
show menu ("Your gender?", game.gender_list, false) {
player.gender = result
show menu ("Your skill set?", game.class_list, false) {
player.class = result
msg (" ")
msg (player.alias + " was a " + LCase (player.gender) + " " + LCase (player.class) + ".")
msg (" ")
msg ("Now press a key to begin...")
wait {
ClearScreen
}
}
}
}
MikeOmega
26 Aug 2012, 17:25THANK YOU! I understand!