|
-
RPG - Random Chest Rewards
Greetings,
I want to program a chest that gives a random reward (from a pool from 10 possible rewards). Which is the best way to program this function? If-else? Switch? Array?
And more importantly, how can I define the chance of getting each reward?
For example: The player has 50% of getting Reward1, 3% Reward2, 0.005% Reward3 and so on?
Thanks.
Last edited by Hurdarr; 08-05-2011 at 07:30 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|