User Tag List

Results 1 to 6 of 6

Thread: Making an enemy drop-rate

  1. #1
    No Products Registered

    Join Date
    Jun 2006
    Posts
    301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Making an enemy drop-rate

    Ok so I want my enemies to have a random chance of dropping items when they die.
    I've made it so when they die they're Alterable Value R gets set to random(1000) + 1. Theres a few items they can drop, eg.if they're value R = 100-120, they'll drop a certain item. Theres an item they drop when they're value R = 1000.
    Now the annoying thing is, I keep seeing these items appear way too often. Far too many enemies are dropping the rarest item when there should be a 1/1000 chance!
    I can't post an example 'cause my game is like 70mb.
    My questions are...does anyone know why this might be happening? Or can anyone think of a different way I could make enemies randomly drop items?

  2. #2
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jun 2006
    Location
    England
    Posts
    3,546
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Making an enemy drop-rate

    MMF2 built-in random isn't amazing. Either change the seed often with the "randomize" action or use a dedicated object such as MT Random.
    .:::.Joshtek.:::.

  3. #3
    No Products Registered

    Join Date
    Jun 2006
    Location
    Australia
    Posts
    197
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Making an enemy drop-rate

    I remember making a rain effect (actives randomly appearing on screen) and it followed a pattern.

  4. #4
    No Products Registered

    Join Date
    Jun 2006
    Posts
    301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Making an enemy drop-rate

    Right ok this MT random object, I don't really understand how to make it work. What do I do with it and what's all this 'seed' buisness?

  5. #5
    No Products Registered

    Join Date
    Jun 2006
    Location
    Ohio, United States
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Making an enemy drop-rate

    The seed basically tells the program what order to draw numbers in. If you have one seed that never changes, you'll get the same results all the time, and these results are never-ending. Take the Sonic games for example. They actually use a random algorithm to pick which attacks to use next. But they're always in the same order, because the seed never changes.

    To make sure you always get different results, you set the seed to the system time. The MT Random object has an option for this in its setup dialog.

  6. #6
    No Products Registered

    Join Date
    Aug 2006
    Location
    Spryfield, Nova Scotia, Canada
    Posts
    85
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Making an enemy drop-rate

    Try using an alterable value or a hidden counter. If the alterable value could vary up to 1000, you'd have to do a little foresight. When the enemy gets defeated, set the counter to RANDOM(1000). Then decide on a few figures: let's say if the counter equals 27, drop a life-up, but drop an ammunition upgrade if the counter equals 114 or a 1-UP if the counter equals 356 or bonus points if the value is 12 and so on. Any number other than those specified by you would leave no bonus. Although you say that certain cool power-ups are supposed to appear at the odds of 1:1000, realize that sometimes through serendipity, the player gets lucky. I have played Megaman and have seen the game drop a truckload of 1-UP's, but sometimes none at all. It's just luck.

Similar Threads

  1. iPhone 5 app frame rate drop bug [beta 8]
    By UrbanMonk in forum iOS Export Module Version 2.0
    Replies: 19
    Last Post: 13th February 2013, 09:24 AM
  2. String object frame rate drop.
    By UrbanMonk in forum iOS Export Module Version 2.0
    Replies: 8
    Last Post: 17th August 2012, 08:40 PM
  3. Increase at same rate with FPS drop.
    By izac in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 22nd January 2010, 03:12 PM
  4. Question about making my enemy duplicates unique
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 5th April 2008, 12:56 PM
  5. Making unchanging enemy id's
    By LazyCoder in forum File Archive
    Replies: 4
    Last Post: 24th September 2006, 05:36 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
  •