User Tag List

Results 1 to 2 of 2

Thread: Random Number Generation Limits

  1. #1
    No Products Registered

    Join Date
    Apr 2007
    Location
    Summerville, SC
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Random Number Generation Limits

    Hi all, I am making an RPG with the basic level up kind of play. I have a counter that represents your attack (How much HP it takes out of the enemy) and I have that counter generate a random number every turn. Depending on your level, I would just have that number generate and then add extra to increase the number. Would there be a way to put limits on the random number generation condition, like instead of the range being 0 - 5 make it 2 - 6 or 5 - 8 instead of the last number being 0? It would make the whole thing a lot easier, I could just have it so that depending on your level the range increases. That would really help me out a lot! Thanks.

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,367
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)

    Re: Random Number Generation Limits

    Just add the minumum value into the expression.

    2 + random(5)

    will produce either 2,3,4,5 or 6

Similar Threads

  1. Random Dungeon Generation
    By nivram in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 30th October 2011, 07:14 PM
  2. Random Cave Generation...
    By MatthewJTabin in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 10th July 2011, 03:39 PM
  3. Random terrain generation
    By ac3raven in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 21st June 2011, 02:24 AM
  4. Random Number Generation
    By AngelicTech in forum SWF/Flash Export Module Version 2.0
    Replies: 3
    Last Post: 2nd July 2010, 02:52 AM
  5. random map generation
    By uprize in forum Multimedia Fusion 2 - Technical Support
    Replies: 14
    Last Post: 2nd April 2009, 11:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •