User Tag List

Results 1 to 6 of 6

Thread: whitelist a randomised number

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    S.East England
    Posts
    744
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    whitelist a randomised number

    Hey all

    Basically making a quiz type of game - i have set it up so that it randomises some questions, and then displays the question based on the result. I have done this with a counter random(10)

    The issue is, i don't want it to repeat the question. Sometimes it will repeat the same question straight away if the randomized number is chosen! How can I white list a chosen number?

    Thanks for any advice =)

    Although maybe an array would help here? not that ive used one much.

  2. #2
    Clicker 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)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,124
    Mentioned
    76 Post(s)
    Tagged
    0 Thread(s)
    You could set up an Active Object (eg. called "WhiteList"), and then set a flag every time a question is chosen. So, if Question 6 is chosen, tell it to set flag 6 to 1. Then, whenever you choose a question, test whether that flag is already 1. If it is, choose again.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    S.East England
    Posts
    744
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Volnaiskra View Post
    You could set up an Active Object (eg. called "WhiteList"), and then set a flag every time a question is chosen. So, if Question 6 is chosen, tell it to set flag 6 to 1. Then, whenever you choose a question, test whether that flag is already 1. If it is, choose again.

    thanks.. i might try this . I started trying to use an array using an example i found here but it's not quite working the way i was wanting.

  4. #4
    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,343
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    This can actually be done very simply. Put the questions in a list object. When asking a question, randomly select a question based on how many lines there are in the list and delete the line. Remember that lists are 1-indexed by default, meaning the first line is line number 1.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    S.East England
    Posts
    744
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well i tried for a while , had some semi-sucess but for some reason f2.5 crashed on me. I couldn't figure it out 100% using the list object. Sometimes the counter linked with the list object was going -1 etc



    If anyone has a spare minute to look at the MFA that would be amazing. The second frame is where i attempted and failed!

    https://ufile.io/816ee

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    S.East England
    Posts
    744
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Redsquirrel View Post
    Well i tried for a while , had some semi-sucess but for some reason f2.5 crashed on me. I couldn't figure it out 100% using the list object. Sometimes the counter linked with the list object was going -1 etc



    If anyone has a spare minute to look at the MFA that would be amazing. The second frame is where i attempted and failed!

    https://ufile.io/816ee


    Weirdly, i got this semi-working until i got a EDRT.exe error and lost my changes!

Similar Threads

  1. Count number of times a number appears
    By Hydra in forum Fusion 2.5
    Replies: 3
    Last Post: 13th October 2014, 05:13 PM
  2. Replies: 0
    Last Post: 15th March 2014, 06:36 AM
  3. Getting a random number between a negative and positive number
    By D_Light in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 9th January 2013, 10:51 PM
  4. How to make a whitelist
    By nick_Peoples in forum Lacewing
    Replies: 1
    Last Post: 11th March 2012, 04:25 AM
  5. Randomised auto spawning and AI
    By stuckboy in forum File Archive
    Replies: 7
    Last Post: 14th September 2006, 12:58 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
  •