A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: RPG - Random Chest Rewards

Threaded View

  1. #1
    Senior Member
    Join Date
    Jan 2008
    Posts
    107

    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center