User Tag List

Results 1 to 4 of 4

Thread: Halp, can't figure out what I'm doing wrong with the Timer.

  1. #1
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    Dec 2013
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Halp, can't figure out what I'm doing wrong with the Timer.

    Alright, so I have a pretty simple game. You're a box, you jump. You have a lazor that you can fire. And so, I wanted to add a cool down on that lazor.

    And so, I did the following:

    -Made it so that when you press space-bar, the timer goes to 50 1/100ths.
    -You can only fire if the Timer is greater than one second.

    That gives us a 50 1/100ths of a second cool down.

    But then, I also wanted to indicate that the lazor is on cooldown by setting the active image of the lazor to a new picture, which is the same lazor picture just more fainter.

    And so, I did the following:

    -When the timer is less than a second, change the picture to the fainter lazor picture.


    Now, I had that event at the very bottom, and it didn't change the picture for some reason. I had a lot of "Change Picture" on the same object before that event happened, but I thought they would be discarded as the event I want to happen is on the bottom. So, I turned them off, and it worked! Well, I still needed them, so I turned them back on.

    And I did the following:

    -Set that the "Change Picture" events above my "Change Picture To Fainter" can only be activated when the Timer is more than one second.


    And it worked(Kind Of). What happens is that the whole thing bugs out completely. For example, on the "Change Picture" events above "Change Picture To Fainter" I not only have them change the picture, but I have them change the order of another object, and I have them to change the size of the picture. Now, the picture itself changes, and that's how I know that the events were initialized. BUT, the size doesn't change. And, the order of the other object that I want to change begins flickering uncontrollably. Very strange.

    I tried to fix this for almost an hour now. Do you guys have any other suggestions on how to make the cooldown or how to fix this? I'm really sorry for the very confusing explanation, it's the best I can do.

    Thank you a lot for reading.

  2. #2
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Stephen's Avatar
    Join Date
    Aug 2008
    Location
    Montana
    Posts
    4,515
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would use values instead of the Timer. If your refresh rate is set to 60(default now - yay), set a value to 60, then have an always event that subtracts 1 from it. When it is 0, do your event.
    _____________________________________________
    Nivram's Examples -Need extensions? Send me a PM.-


  3. #3
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    Dec 2013
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That is indeed a wonderful alternative, Stephen. I don't know why I didn't think of that. I sadly can not try it right now as I am on my tablet, but I'll report back if it works. And, it would take care of FPS drops if the Timer isn't in conjunction with delta time. But, I think it is.

    Thanks.

  4. #4
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    Dec 2013
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Stephen, it worked the first time I tried without any bugging issues, and the events followed the execution order correctly. Not sure what the hell was up with the timer though.

    Thanks anyway!

Similar Threads

  1. V-Sync Is Crashing My Game - Info Inside - Halp!
    By edman3d in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 3rd January 2013, 11:07 PM
  2. Jumps in the wrong direction. Cant figure this one out :/
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 29th July 2012, 09:06 PM
  3. Beat 'em Up AI: HALP!
    By The_Beaul in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 13th July 2010, 04:13 AM
  4. More halp (again...)
    By gro0003 in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 11th August 2007, 03:05 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
  •