"Wait x Milliseconds" ?

New releases and general discussions.

Post » Sat Jul 26, 2008 9:05 pm

Would it be possible to add this to the "System" object sometime in the future? In addition, "Wait x Ticks"?

It wouldn't pause the action on the screen, it would simply wait a designated amount of time after the previous event before processing the next one. You can probably do the same thing right now with a timer, but I feel like a "Wait" command would be faster and easier to remember.

-Thanks!
B
4
S
2
G
4
Posts: 401
Reputation: 2,302

Post » Sat Jul 26, 2008 10:56 pm

+ Trigger once While True
+ Every X Miliseconds

Done or you could just do a "Compare time" with delta of your current time :P
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Sun Jul 27, 2008 3:50 pm

Ah, thanks!
B
4
S
2
G
4
Posts: 401
Reputation: 2,302

Post » Sun Jul 27, 2008 4:02 pm

Not sure what you're getting at here, but the Function object has a "Call function after delay" action. So if you want to play a sound 2 seconds after you press spacebar, you can call function "play sound" after 2000ms. And you definitely don't want to wait a number of ticks, otherwise your game becomes framerate dependent.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,610

Post » Sun Jul 27, 2008 5:44 pm

I didn't actually need a "wait x ticks", I just mentioned it because there was already a "every x milliseconds" and a "every x ticks". To be honest, I wasn't even sure if "ticks" was the same thing as "frames"...

Anyway, thanks for your suggestion as well, Ashley.
B
4
S
2
G
4
Posts: 401
Reputation: 2,302

Post » Tue Jul 29, 2008 10:45 pm

[quote="Ashley":m6zd0per]Not sure what you're getting at here, but the Function object has a "Call function after delay" action. So if you want to play a sound 2 seconds after you press spacebar, you can call function "play sound" after 2000ms. And you definitely don't want to wait a number of ticks, otherwise your game becomes framerate dependent.[/quote:m6zd0per]

Thanks! i've been looking for a way to do that! If it could be added later it would also be nice to have an action like that in the system object so you could just ad to an event -wait 2000ms.
B
8
S
2
G
5
Posts: 744
Reputation: 3,288


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 2 guests