Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
hattorihanz0

Random number generator

Question

I've tried to figure this one out but I'm stumped. I need to come up with a random number generator 1 through 101 that is tied to a specific character (when the action button is hit) which will trigger a choice event, based upon the number. Other words, when I walk up to a character I'll press enter, he'll say a number then will have R1,R2,R3 as choices. I figured out how to do a manual number system, but that's kind of pointless for the games purpose. Upon choosing one of the (R's) the character will teleport to the a specific section on the map (this part figured out also) and will have the correct number of characters shown (based on the random number)after the original character that gave the random number teleported (stuck on this part).

 

Sorry if my wording is confusing, if anyone needs clarification please feel free to ask.

 

Please keep in mind this is my first game with RMXP.

 

Is it possible to do all this with just events and variables or will scripting need to be done?

 

Any and all help is appreciated.

Thanks in advance.

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0

This seems possible through events, I believe I did this before, and I see what I can do to help. Do you know how to use the random variable function?

Share this post


Link to post
Share on other sites
  • 0

I can use some clarification on what you mean but as far as I can understand, this would be a possible solution: Set a variable to randomize them make a conditional branch for the character and variable. Like so

2qlrcw7.jpg

Share this post


Link to post
Share on other sites
  • 0

I can use some clarification on what you mean but as far as I can understand, this would be a possible solution: Set a variable to randomize them make a conditional branch for the character and variable.

 

Will the variable number be visible as a regular txt msg?

 

 

thx again for the help everyone.

 

 

 

I'm waiting at a certain point in the game, I walk over to a character and press enter.

When I press enter the character will say "There are (insert random number) us" afterwards the choice of R1,2,3 will show up. Once you choose the row they will teleport to that specific row and will show that many characters (of the random number)

Share this post


Link to post
Share on other sites
  • 0

I dont actually get what your trying to do but to generate a random number in a variable, go to the event command select set variable and set it to random

Share this post


Link to post
Share on other sites
  • 0

@rgangsta I'm pretty sure I get your code and thanks a ton. Still a question.The random number needs to show up in a dialogue box as if the characters are speaking (which this part I already know how), but with the conditional branch, how do I make that random number (from the conditional branch) show up in the dialogue box and retain the conditions?

 

btw, your guys responses are incredibly fast!

 

****

 

Maybe easier

 

I need a random number to show up in a dialogue box (only random the first time you select character)

Share this post


Link to post
Share on other sites
  • 0

@rgangsta I'm pretty sure I get your code and thanks a ton. Still a question.The random number needs to show up in a dialogue box as if the characters are speaking (which this part I already know how), but with the conditional branch, how do I make that random number (from the conditional branch) show up in the dialogue box and retain the conditions?

 

btw, your guys responses are incredibly fast!

 

****

 

Maybe easier

 

I need a random number to show up in a dialogue box (only random the first time you select character)

 

Put this in a message box "\v[x]" (no quotes. even with quotes, it won't affect the message). The x is the variable number that you want it to be. For example, my message would say this: "Randomly from 1-101, you number is \v[3]!", In the game, the "\v[3]" text will turn into the actual value of that specific variable.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...