Need help with timer [SOLVED]

Discussion and feedback on Construct 2

Post » Sun May 05, 2013 6:20 pm

MODERATOR: PLEASE MOVE THIS TO "How Do I..." SECTION OF FORUM. THANKS

I am trying to create an achievement engine, and so far it works well. There's only one problem: I don't know how to display the unlocked achievement for a certain amount of time. What I tried doing was destroying the achievement after 5 seconds, but when I unlocked it 5 seconds after I launched the test game, it never showed up.

In short: how do I make an invisible timer that I can start, stop, and reset?

Keep in mind that I am using the free edition, so try not to explain it with too many events, if possible. Thanks. coolernow1232013-05-05 18:56:28
B
16
S
5
G
3
Posts: 47
Reputation: 2,276

Post » Sun May 05, 2013 6:22 pm

Also, I looked for a solution already, but couldn't find one.
B
16
S
5
G
3
Posts: 47
Reputation: 2,276

Post » Sun May 05, 2013 6:49 pm

What I would do, is have an Instance Variable in the sprite called TimeLimit of the achievement, then...

+Every Tick
-Add "dt" to TimeLimit

+Sprites' "TimeLimit" > 5
-Destroy Sprite
B
45
S
19
G
10
Posts: 562
Reputation: 9,543

Post » Sun May 05, 2013 6:56 pm

[QUOTE=Jase00] What I would do, is have an Instance Variable in the sprite called TimeLimit of the achievement, then...

+Every Tick
-Add "dt" to TimeLimit

+Sprites' "TimeLimit" > 5
-Destroy Sprite[/QUOTE]

That's...GENIUS!
B
16
S
5
G
3
Posts: 47
Reputation: 2,276

Post » Sun May 05, 2013 7:09 pm

I'm glad I could be of help!
B
45
S
19
G
10
Posts: 562
Reputation: 9,543


Return to Construct 2 General

Who is online

Users browsing this forum: supreme676, zenox98 and 15 guests