User Tag List

Results 1 to 5 of 5

Thread: Question about Global values

  1. #1
    Clicker Fusion 2.5 Developer

    Join Date
    May 2007
    Location
    Georgia
    Posts
    194
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question about Global values

    I'm working on a space shooter
    I have setup an ammo system, so you can only shoot your weapon when you have ammo

    I have setup Alterable Value to Global Value C
    I have Ammo Counter to Global Value C
    I have when you pick up an ammo pack you add 10 to Alterable Value and Ammo Counter

    When you shoot your weapon subtract 1 from counter and Alterable value

    you can only shoot when there is greater then zero in Alterable Value

    I have 3 ammo packs, 30 shoots total for testing
    I can shoot down to 10 and then can not shoot any more
    sometimes the counter will count down when shooting then back up then down
    IE 20,19,28,17,16,15,18,17,16,15,13,10 and will not fire again

    I will upload the code if anyone can help me out with this, not sure what I'm doing wrong.

    I did have it all setup to just global value C however that wasn't working at all.

    Code: http://wilkinsp.home.comcast.net/~wilkinsp/Application(1).mfa

  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: Question about Global values

    Thank you for attaching the file - it makes answering these so much easier!

    It took me a while to actually see the effect, but it seems to be that the actual display of the counter is causing the problem - the debugger thinks the counter is at the right value, but it still displays the "1" to the side when it drops below 10 after being above it (until the playfield is scrolled). And Display as Background is off, too... so I'm at a loss to explain why this happens.

    I would, however, try and consolidate the "ammo counter" into one place. At the moment you have to update it in Alterable Value A of the player, Global Value C and the ammo counter, while you could just keep it in Global Value C and have the others always set themselves to this value. You can also rename globals/alterables to make their meaning clearer.

  3. #3
    Clicker Fusion 2.5 Developer

    Join Date
    May 2007
    Location
    Georgia
    Posts
    194
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Question about Global values

    Thanks I'll look into that and renaming them

    Also the Crystal Tower game is very cool

  4. #4
    Clicker Fusion 2.5 Developer

    Join Date
    May 2007
    Location
    Georgia
    Posts
    194
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Question about Global values

    okies corrected it to where is is just global value C
    however same error is happening

    I might try to rebuild it from the start

  5. #5
    Clicker Fusion 2.5 Developer

    Join Date
    May 2007
    Location
    Georgia
    Posts
    194
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Question about Global values

    I corrected the issue, thanks all
    I didn't have Save Background checked and it was causing the 1 to say looking like it was miscounting

Similar Threads

  1. Question about Global Values for Multiple-Powerup-Object
    By vSv in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 28th May 2013, 05:34 PM
  2. Total number of Global Alterable Values question
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 16th May 2012, 10:08 PM
  3. Quick Global Values/Strings Question
    By CBSection31 in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 28th August 2010, 12:06 AM
  4. Newbie question about global values.
    By Martin in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 24th May 2010, 10:25 PM
  5. Comparing 2 global values question
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 19th January 2009, 04:23 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
  •