The Daily Click ::. Forums ::. Klik Coding Help ::. Counter Glitch help
 

Post Reply  Post Oekaki 
 

Posted By Message

Eonix



Registered
  28/05/2014 04:56:00
Points
  2
28th May, 2014 at 28/05/2014 04:59:24 -

Hey I'm trying to find a way for my frames to be able to change quickly with out my counter freezing up and not moving when the frams change too fast , i have used many to use my counter but im not sure how to use a sub program and cant seem to find out what i need , help is needed I'm open minded.
Thankkkks

 
-Young but dedicated-

The_Antisony

At least I'm not Circy

Registered
  01/07/2002
Points
  1341

VIP MemberStarSnow
28th May, 2014 at 28/05/2014 07:31:26 -

The only thing I can assume here is that you have three frames, a counter object, and a global value that increments the counter and the problem you're having is that you're switching from frame 1 to frame 2, then from frame 2 to frame 3 so quickly that the counter doesn't have enough time to graphically update. Is this correct?

If that's not correct, what is the point of the timer and why are you trying to quickly switch between frames?

 
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?

Eonix



Registered
  28/05/2014 04:56:00
Points
  2
28th May, 2014 at 28/05/2014 21:50:33 -

that is correct but with more frames which just makes the graphical update lag behind even more , do you know a fix ?
Thanks.

 
-Young but dedicated-

The_Antisony

At least I'm not Circy

Registered
  01/07/2002
Points
  1341

VIP MemberStarSnow
1st June, 2014 at 01/06/2014 21:56:55 -

I'm pretty sure the reason why your counter isn't updating now is because each level skips to a different level before allowing enough time to graphically update the counter. Keep in mind that MMF only graphically updates once per event loop, so if in your event editor you have the frame add or subtract from a global value, set the counter to the global value, then skip to the next frame, MMF will update the counter value, but will attempt to skip to the next frame before the counter graphically updates. If you have other events running, you'll need to somehow allow for enough time for the counter to graphically update, then switch to the next level.

Here's an example I threw together:
https://onedrive.live.com/redir?resid=3B49FFB7B0BB8733%21150

Here's how it works:

Start of Frame:
Special Conditions -> Set Global Value "FrameDecay" to 5.
Special Conditions -> Add 1 to Global Value "Counter".
Counter: Set "Counter" to Global Value "Counter".

Always:
Special Contitions -> Subtract 1 from Global Value "FrameDecay".

Global Value "FrameDecay" <= 0:
Storyboard Controls -> Next Frame.

So, yeah; at the start of each level, FrameDecay is set to 5. The always event steps the FrameDecay from 5 to 0 allowing each frame to display just long enough to update the counter, allow the frame to graphically update, and give the player enough time to see the counter increase.

In each level, you can change the "Start of Frame: Special Conditions -> Set Global Value 'FrameDecay' to 5" event from a value of 5 to something higher if you want the pause between frames to be more signifigant. It's a bit of a pain in the arse to change that value on EACH level, but the only way I can think to get around the problem is by making the value external and storing it in an INI or something; lots more events at that point, though.

EDIT: I wanted to add that you don't necessarily need to use global values. You could alternatively use some kind of global string/value plugin to preserve the counter between frames. Instead of making the FrameDecay a global value, you could set it as an alterable value in an active object on each frame.


Edited by The_Antisony

 
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?
   

Post Reply



 



Advertisement

Worth A Click