User Tag List

Results 1 to 3 of 3

Thread: Problem with global values responding in a weird way.

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

    Join Date
    Jul 2010
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem with global values responding in a weird way.

    So I have two conditions that handles a couple of values.

    Condition 1:
    player collision with ITEM
    if X <1 set X to 1 and Z to 1 | Destroy ITEM


    Condition 2:
    player collision with ITEM
    if X >0 set Y to 1 | Destroy ITEM

    When player does collide with ITEM application will set Y to 1 even if X <1

    Why?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export Module

    Join Date
    Apr 2014
    Posts
    108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think I know what's up... Let's step through piece by piece.

    Loop Starts (X=0 at start)
    Condition 1 is true, sets X = 1
    (X=1 now)
    Condition 2 is now also true, because X was just updated to be 1

    Attached is a project file that shows it in action, if you flip the order of lines 3/4 it works as expected

    global-issue.mfa

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

    Join Date
    Jul 2010
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Than kyou We got this sorted in the chat aswell. I Had a similar problem later with a "switch" event, where I had to make a "cooldown" for the values so they weren't read as the same time. So yeah, solved!

Similar Threads

  1. Global Values & Alterable Values with same names
    By Gustav in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 7th November 2012, 06:15 PM
  2. how do i use Values and global values?
    By gamebuilder in forum The Games Factory 2 - Technical Support
    Replies: 2
    Last Post: 24th April 2012, 12:54 AM
  3. Global Values
    By Rabagast in forum Multimedia Fusion 2 - Technical Support
    Replies: 13
    Last Post: 8th June 2009, 05:20 PM
  4. Negative values in a List, and Global Values
    By aidmm in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 20th January 2007, 06:08 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
  •