User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: Flags and Global Value questions

  1. #1
    No Products Registered

    Join Date
    Oct 2007
    Location
    Norway, Oslo
    Posts
    379
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Flags and Global Value questions

    Hi!

    Can someone explain me how flags works and global value?
    I think I need to know a little bit more about it to continue with my game.

    Thanks

  2. #2
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jul 2006
    Location
    Pittsburgh, PA, USA
    Posts
    777
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Flags and Global Value questions

    Global values are variables that can be set and received on any frame.
    Flags are like Global values but can only be set to 2 values: 0 (off) and 1 (on). Also, their data is not carried between frames.
    Makes sense?

  3. #3
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,825
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)

    Re: Flags and Global Value questions

    Flags can be set to either on or off
    You can then test the value of the flag

    So for example
    If your character needs a key to open a door
    You can set a flag to "ON" when it gets the key
    Then you can test for the flag to be "ON" so the character can open the door

    Global Value/Global Strings
    also
    Alterable Values/Alterable Stings

    These are all areas to store data in
    (Called variables in other languages)

    The global ones are for your entire application.
    You can get to them on any frame and the data entered into them exist for the entire run of your game.

    The alterable values and strings on certain objects (Active for example) are data storage areas that are specific to that object only.

  4. #4
    No Products Registered

    Join Date
    Oct 2007
    Location
    Norway, Oslo
    Posts
    379
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Flags and Global Value questions

    Thank you

    If I get a key, I set the flag to "on", so I can open the door?
    And when I open the door, I don't have any more key left and then I set the flag to "off"? Flag "on" = open door, Flag "off" = close door.
    Is this right?

  5. #5
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jul 2006
    Location
    Pittsburgh, PA, USA
    Posts
    777
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Flags and Global Value questions

    Yes. That's right. If you have more than one key, though, you may want to use global values. You would name a global value "keys." When the player gets a key, add 1 to that value. When the player opens a door, subtract 1 from that value. To test to see if the player can open the door, test if global value "keys" is greater than 0.

  6. #6
    No Products Registered

    Join Date
    Oct 2007
    Location
    Norway, Oslo
    Posts
    379
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Flags and Global Value questions

    So, it's better to use global values instead of alterable values?

  7. #7
    No Products Registered

    Join Date
    Oct 2006
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Flags and Global Value questions

    It depends on how you are making your game. If you need the data in other frames, use a global value. If you don't, use an alterable value or a counter.

  8. #8
    No Products Registered

    Join Date
    Oct 2007
    Location
    Norway, Oslo
    Posts
    379
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Flags and Global Value questions

    Thanks for the help. I fixed it

  9. #9
    No Products Registered

    Join Date
    Oct 2007
    Location
    Norway, Oslo
    Posts
    379
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Flags and Global Value questions

    Just one other question. If I have a green key to the green door and a red key to the red door, Should I for example use flag 0 on green door and flag 1 on red door?

  10. #10
    No Products Registered

    Join Date
    Feb 2008
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Flags and Global Value questions

    Yes

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Global Events questions
    By Macaw in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 28th May 2013, 06:15 PM
  2. Internal flags questions
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 22nd January 2010, 12:04 PM
  3. Suggestion-global flags
    By falkon in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 29th May 2008, 09:54 AM
  4. Using flags for my UI
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 13th April 2008, 09:55 PM
  5. Global Values, Custom Keys, and other Questions...
    By ACESpark in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 3rd October 2006, 07:59 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
  •