User Tag List

Results 1 to 4 of 4

Thread: Randomly chosen questions

  1. #1
    PlanB
    Guest

    Randomly chosen questions

    I am attempting to make a trivia based game that sends the player random questions, I've worked out a basic code outline for it.

    However I need to know if its possible to do a form of "IF" statement along with variables in MMF.

    Also, if not, I'd appreciate any suggestions to getting questions to be selected at random.

  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Randomly chosen questions

    I'm not sure what you mean by "IF" statement because that's what events are... if Player collides with Doughnut, decrease Health("Player") by 1, if List Line Text$("List") = "Go home" then do something else. If you want to have an IF inside an expression you can use the Immediate IF (IIF) object, which takes in two variables and a condition (>, <, =) and outputs one of two possibilities depending on whether it's true or not.

    What I would do for a trivia game like this is to store the questions and answers in an external file (plain INI would do), so that they could be read by picking a random number and then looking up the items that correspond to it. Perhaps if you go over how you're thinking of approaching it someone can give you pointers as to how to do it in MMF.

    Good luck and welcome to the forums

  3. #3


    Join Date
    Apr 2010
    Location
    Wi, United States
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Randomly chosen questions

    ya he meant the event editor. The event editor graphically shows if statments, rather than typing If "blaBla" = "bla" then do "bla".

    To choose a random question, use ba random number generator object, and the generate a number between your number of questions that can be chosen, and then store the chosen number to a variable, and then display which question (with the event editor) that is chosen. You might have to make a seperate event for each check to make it simple, im not too sure how to do advanced loops or checks yet, i go for direct approaches and check each type of event seperately for debugging purposes.

  4. #4
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    USA
    Posts
    461
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Randomly chosen questions

    You may want to take a look at the Random Multipool object which was built mostly for this kind of things.

Similar Threads

  1. Apple / iTunes New & Noteworthy list - anyone or chosen?
    By GameMaker2019 in forum iOS Export Module Version 2.0
    Replies: 2
    Last Post: 18th March 2013, 06:25 AM
  2. Updating all objects' strings, not the chosen object's: I'm looping wrong
    By rubes in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 24th November 2012, 12:31 PM
  3. 8 directions chosen but only 4 shows up!!!
    By Aloan in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 18th November 2012, 01:27 AM
  4. Force users to use my chosen install path.....!?
    By eSkRo in forum Install Creator and Patch Maker
    Replies: 1
    Last Post: 4th March 2010, 11:51 AM
  5. Replies: 8
    Last Post: 25th September 2009, 12:04 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
  •