Timer Object

For questions about using Classic.

Post » Thu Sep 04, 2008 11:44 pm

Hey, this is a basic question, but how do I do a timer like object? I was playing with Timelines, and I created a timeline that takes 3000 ms to execute (should be about 3s) and then setup an event when the period is finished. The event executes, but seems to execute instantaneously after the timeline object is created (when the player runs out of ammo), even with an obnoxiously high ms (30000).

(I'm trying to have the player stop for 3 seconds while they 'reload' their weapon)
Posts: 1
Reputation: 1,027

Post » Fri Sep 05, 2008 12:21 am

Hmm, maybe you shouldn't use the timeline object for this. How about 'Every X milliseconds' in the system object? Or, 'Compare time' in the system object if you want to trigger an action at a certain time. Alternatively, the Function Object has an action - 'Call function after delay' - which allows you to, for example, re-enable firing after a few seconds.
Scirra Founder
Posts: 25,097
Reputation: 199,802

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests