Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
Sign in to follow this  
Csoda

[XP] - Need Help with Random generating!!

Question

Im tryung to do a system in wich you geat a random ammoun of an item then when you go to the vending machien it will give you an item corisponding to the amount of the item you have, i tried it using the method as shown in my image, can anyone suggest an easier way for me to randomly distibute items? or fix my method?

post-12276-126219035759_thumb.jpg

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

one thing you can do is ok lets say...

 

you have 10 possible items right?

 

so your random generator will range from 1 ~ 10

 

after that just do a conditional branch WITHOUT HANDLING for each variable.

 

so in a nut shell.

 

Control Variable: "###:random Gen" Random 1 - 10

Conditional Branch: When Variable "###:random Gen" = 1

-Give item 1

Conditional Branch: when variable "###:random Gen" = 2

-Give item 2

 

Idk exactly what the problem is but it may be because you put everything under an ELSE for the conditional branch. if you take HANDLING off, then you wont even see the "else"

 

to back quick and untested theory out, i think if you get anything aside from the 1st stated conditional branch, then it goes to the else which states it has to be something else... basically i believe if the random number comes to say the 4th choice, it has no way to travel directly to it.

 

in your picture, it looks like you're trying to do something completely different, but i did this explanation based off your post...

Share this post


Link to post
Share on other sites
  • 0

You basically described a shop system.

 

I think I can see an error in your screenshot. At the start of the event processing, you need to have a 'Control Variables' command which randomizes your variable RandomSet1 within the range you want. From the looks of it, the variable is set to 0, so no conditions of the conditional branches are being met.

 

Make sense?

Share this post


Link to post
Share on other sites
  • 0

Thanks, you guys helped alot, but im still bumping in to a couple of problems.... im thinking of scatching thw whole thing and like marked said ill try to make a shop based system much like the random battle encounter system.

 

If your still interested iv moved my thred to this link:

http://www.rmxpunlimited.net/forums/index.php?showtopic=4005#entry32814

 

 

Thats you again for the help and support!

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...