User Tag List

Results 1 to 9 of 9

Thread: Less than random Random Choice?

  1. #1
    No Products Registered

    Join Date
    Aug 2006
    Location
    Oklahoma
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Less than random Random Choice?

    I want to be able to pick random enemies to attack by picking the m by random. That is easy enough, but I want them to be introduced gradually.
    As the player levels up I want only enemies with the matching level (alterable value c) to be able to be randomly picked.
    I tried making an event that one would think would make this happen, but EVERY enemy with that level appears. Any suggestions?

  2. #2
    No Products Registered

    Join Date
    Sep 2006
    Location
    Germany
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Less than random Random Choice?

    Random 100

    = 12,5,87,100,1 etc.

    Random 20 + 80

    = 81, 89, 100, 98, 89 etc.

    get the point ?

  3. #3
    No Products Registered

    Join Date
    Aug 2006
    Location
    Oklahoma
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Less than random Random Choice?

    That isn't what I was looking for.

    This is how it is. I have a qualifier for enemies. Certain enemies have a level 1, some have a level 2, and so on.
    I have a timer that counts down from 5 and on 0 I want a random enemy picked with a level that is less than or equal to the level of the player.
    I tried this:
    Counter = 0
    +Alterable Value C ("Group.Enemies") <= value ("Level Counter")
    +Pick ("Group.Enemies") at random

    These conditions told one of the bad guys to activate flag 0 and attack. Instead, ALL of them attack!

  4. #4
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Århus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Less than random Random Choice?

    Just do this:

    Set a counter to random( <playerLevelHere> )
    If counter == 0
    --> create "baddie level 1"
    If counter == 1
    --> create "baddie level 2"
    ect.. ect..

    However if you are level 120 then you still get lvl 5 monsters for example. To make a level range instead set counter to:
    random( <levelRange> +1 ) + <playerLevel> - <levelRange>

    For example: if the level range is 10 and the playerlevel is 60, then a possible outcome is:
    3 + 60 - 10 = 54

    Then it will always be less or equal to the player level but within the level range.

    *edit* just realized you wanted to pick out enemies, not creating them.
    If you use the 'set counter' code from above I mentioned, this code should work:

    (compare to alterable value) if Monsterlevel of 'group.enemies' <= <theRandomCounterValue>
    pick one of 'group.enemies'
    ---> Do stuff

    It is critical that you don't use "compare two general values" to compare the monsters level as MMF2 will not pick out any objects then. It will only tell you if the comparisson was true for the last created object of those types and then not "pick them out". So any actions afterwards a 'compare two general values' will just affect all objects.
    A good thumb of rule is that "object selection" only occurs when you use the object's own conditions. (with exception to the 'New object' object that can pick out objects based on position or the Mouse object that can pick out objects if they were clicked)

  5. #5
    No Products Registered

    Join Date
    Aug 2006
    Location
    Oklahoma
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Less than random Random Choice?

    Oh bother... It didn't work. All the enemies still came at once.

  6. #6
    Clicker Multimedia Fusion 2
    SEELE's Avatar
    Join Date
    Jul 2007
    Location
    Terra australis incognito
    Posts
    1,916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Less than random Random Choice?

    KingToast, they are right, keep trying you must be making a mistake somwhere.

    if your totally stuck upload your "BAD" engine and well fix it :cool:.

  7. #7
    No Products Registered

    Join Date
    Aug 2006
    Location
    Oklahoma
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Less than random Random Choice?

    Hm. I will keep taking a look, though it isn't IMPERATIVE that the bad guys appear as I want them to, it would just be easier on the player.

  8. #8
    No Products Registered

    Join Date
    Jun 2007
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Less than random Random Choice?

    I don't think the Pick At Random even works properly for qualifiers...

  9. #9
    No Products Registered

    Join Date
    Aug 2006
    Location
    Oklahoma
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Less than random Random Choice?

    I don't think so either. Unless it is just the simple one out of them all. Qué triste!

Similar Threads

  1. Random Active Spawn in Random Location in Frame
    By Top_of_the_Temple in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 20th October 2016, 03:33 AM
  2. Make Random Pool not-so-random?
    By UltraHammer in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 4th April 2013, 02:53 PM
  3. BUG: Random is not random in Flash mode
    By oldkliker in forum SWF/Flash Export Module Version 2.0
    Replies: 1
    Last Post: 11th October 2011, 08:56 PM
  4. Random and MT Random strange behaviour
    By crusher in forum iOS Export Module Version 2.0
    Replies: 0
    Last Post: 8th October 2011, 01:32 PM
  5. Random Speed + Ypos at random times
    By Keehan in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 14th May 2011, 05:25 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
  •