How do I time my moving sprite and fix timer(wait)

Get help using Construct 2

Post » Mon Aug 24, 2015 5:40 pm

Image

I would like to have an image of fog spawn in from the start of layout at 6 seconds (just an example it's actually 176), it does do this but if I die before the 6 seconds then the timer(wait) will not stop and the fog will appear when my player is dead still from 6 seconds. Is there a way to stop this if I need to use a timer instead would you mind making it simple for me to understand I can't seem to find much info in the forums on making a timer on a sprite.

Here is another way I tried but with this way the fog will not appear when I click my restart level/layout button


Image

Many thanks in advance this simple thing has got my in a right pickle
Image
B
28
S
7
G
1
Posts: 110
Reputation: 2,688

Post » Mon Aug 24, 2015 6:08 pm

You can add a sub event to your "on start of layout" to check if the player is alive or not.

on start of layout
(sub event)
Player.alive = 1- > create fog

this way it will only create the fog if the player is alive at the start of the layout
B
87
S
44
G
16
Posts: 1,005
Reputation: 17,938

Post » Mon Aug 24, 2015 6:37 pm

@justifun thanks, pretty new to this I have a function for what happens when the player is dead how would I create the alive or sub event?
Image
B
28
S
7
G
1
Posts: 110
Reputation: 2,688


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 24 guests