The Daily Click ::. Forums ::. Klik Coding Help ::. Timed events
 

Post Reply  Post Oekaki 
 

Posted By Message

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
10th August, 2007 at 13:33:02 -

Is there a way in MMF2 to make it so "When this happens, wait 3 seconds then do this."? The way I have been doing this before is using an active object and telling it to start moving when the even happens, then after it has gotten so far do the next event. There must be a better way then this?

Any help much is appreciated

 
Image

Tell 'em Babs is 'ere...

Deleted User
10th August, 2007 at 13:39:44 -

Yeah, basic way:

(thing happens)
--> set flag 0 on
--> set Alterable Value A to 0

Flag 0 is on...
Add 1 to Alterable Value A

Flag 0 is on
+ Alterable Value A >= 150
--> (then do this)


That's relying upon you using MMF2 at 50 frames per second. Alterable Value A = 50 is one second in this case. If you're using a different framerate then to set the right delay, do numberOfSeconds * frameRate.

 

Phredreeke

Don't listen to this idiot

Registered
  03/08/2002
Points
  4504

You've Been Circy'd!VIP MemberPS3 Owner
10th August, 2007 at 13:44:33 -

SEE Phizzy can be helpful.

 
- Ok, you must admit that was the most creative cussing this site have ever seen -

Make some more box arts damnit!
http://create-games.com/forum_post.asp?id=285363

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
10th August, 2007 at 14:28:36 -

Thank you Phizzy!

 
Image

Tell 'em Babs is 'ere...

Tim

I'm on here way too much

Registered
  25/08/2006
Points
  132

You've Been Circy'd!Clickzine StaffSilverNova MemberVIP MemberTurtle Power!Evil klikerWii OwnerHero of TimeGhostbuster!Pokemon Ball!
10th August, 2007 at 14:33:28 -

Phred, I could have told Slink that. I'm not saying Phizzy CAN'T be helpful...

Anyway, well done Phizzy - that'll get you at least another week of not being banned

 
http://www.SilverNova.co.uk


Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
10th August, 2007 at 14:38:09 -

Yarr, timer events can be deceiving; Like Phizzy said you can set a counter or value to 3x the framerate, and subtract 1 from it each frame. The "timer object" events, including "restrict action for..." and "every..." don't operate as you might think; they use the base system time, meaning they operate in REALTIME, not gametime, so even if your game drops below 50 FPS, they will still function every 3 seconds of real-time. The main problem with these is that if you pause your game by holding the ALT key, or other means, it will treat it as 3 seconds have past.

So its pretty good to use in-game timers for all gameplay aspects, like phizzy said, and reserve timer-based actions for unimportant stuff like visual effects or particle sprays.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456
   

Post Reply



 



Advertisement

Worth A Click