[RM2K] NAMES IN MESSAGES WITHOUT IF/THEN CONDITIONS EVERYWHERE?

Posts

Pages: 1
I have a minigame that picks a party member at random of say... 36 possible members. (not the # but there's alot) Is there some way of displaying a member's name in a message without having a separate Condition and Message box for every hero?

What I want:
Hello, (random member number)! I You have been chosen!

What I have:
IF # = 1, "Hello Alex!"
IF # = 2, "Hello Beatrice"
.....

- Mike
Sure... your heroes are numbered on the database. So, for example, if you have 36 heroes, you can pick the random hero with:

Set variable(chosen hero) = random number between 1 and 36.

To show the message, use the \n command with the number of the variable(chosen hero). For example, if the variable is number 0001, use the command:

\n[\v[0001]]
That's what I thought I did, but I get an "Invalid Hero" message and then a crash. If the random number being pulled is 15, could the engine be looking for 0015 instead? (including zeros)

Variable 0004 (NAME) = Random # 15-18
"I have chosen you, \n{\v{0004}}!"

(I have replaced the
How come when I edit a post it gets cut up?
Well... just in case, insert a message with
\v[0001]
just to see what number is being generated.

The game doesn't distinct 15 from 0015, so that's not what is causing the crash.
\v{0001} is showing 15
Hero 0015 is Serg Fitzjal
And how do you turn off a post's Auto Formatting?
Does this work with RM2k? I tested it with 2k3 and it was fine (as long as the variable was an actual hero or zero) but I can't confirm regular ol' RM2k. It might be hitting the '\' in \V and shitting a brick but I'm not sure.
Well poop, I don't want to do it the long way :/
To get square brackets, use code tags like so:
\V[4] is hero #\N[\V[4]]
Ok, I just tested this. It works fine on RM2k3, but I get the same error on RM2K. Apparently it doesn't work on 2k :(
Move on to a better maker like RM2k3!
Pages: 1