User Tag List

Results 1 to 5 of 5

Thread: Randomizing Pick?

  1. #1
    No Products Registered

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

    Randomizing Pick?

    Hello everyone, I am making a virtual trading card game but am having a little trouble. When the player chooses to buy a pack of cards and the pack is opened, I have a counter that gets randomized from 0-100 (Upon using "generate random number" thing) to choose a certain card. (They each have a number) Would anyone have advice to how it finds the card with the same number and selects that card without having to go through thousands of conditions? I've tried assigning an alterable value to each card with the value being what number that card is but I'm still stumped. Any help would be greatly appreciated. Thanks.

  2. #2
    Clicker Fusion 2.5 DeveloperHTML5 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
    Jul 2006
    Location
    USA
    Posts
    2,982
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Randomizing Pick?

    Hmmm. What exactly wasn't working when you tried assigning the alterable values a number?

    Like if you did: Start of Frame -> Set Alt Val A to 1, etc. for each card, that should work. Granted, if you have 100 cards, you're going to have to do that 100 times, which is a pain.

    Also, making the cards global to the application would probably help if you're switching frames and the like.

  3. #3
    Clicker Fusion 2.5 DeveloperHTML5 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
    Jul 2006
    Location
    USA
    Posts
    2,982
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Randomizing Pick?

    Another thing to consider using the alterable values, is that you are going to have to assign that everytime you "call" that card object.

    Like if you destroy it, and then create a new one, that alterable val is going to have to be set again. Unless you have an event that says "Always set Alt Val. A to [value of card]"

    Another alternative would be to create all the cards at start of frame, then place their coordinates off the playfield to hide them when not in use (or a more simpler way just turn off the visibility). Then you never have to create or destroy a single one. Just move their position when you need them.

  4. #4
    No Products Registered

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

    Re: Randomizing Pick?

    Yeah, I think I'm going to have to just do that. I was just trying to see if there was an easier way, but it looks like I may just have to do what you said. Thanks for the info.

  5. #5
    Clicker Fusion 2.5 DeveloperHTML5 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
    Jul 2006
    Location
    USA
    Posts
    2,982
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Randomizing Pick?

    Quote Originally Posted by Jdsfrog
    Yeah, I think I'm going to have to just do that. I was just trying to see if there was an easier way, but it looks like I may just have to do what you said. Thanks for the info.
    I've never tried the loop extensions like fastloops, etc, but it may be worth looking into. If you can do a loop that will assign the alt values, that would be a lot easier. Like a sample of the logic used would be something like:

    For 0-100 Do

    Alt Val. A = value

    value = value + 1

    While

    Now keep in mind that's not any sort of real syntax, just the logic behind a simple for/while loop. I have no idea how the loop extensions actually work in MMF2.


Similar Threads

  1. randomizing items without overlaping
    By mega21 in forum Multimedia Fusion 2 - Technical Support
    Replies: 18
    Last Post: 11th September 2011, 09:15 PM
  2. randomizing
    By pikzilla in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 2nd April 2009, 10:02 PM
  3. randomizing values
    By Cossin in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 10th September 2008, 11:27 PM
  4. Randomizing anims
    By mussashimits4 in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 13th July 2006, 11:47 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
  •