How do I pause a sprite instance 5 sec. and the resume

Get help using Construct 2

Post » Mon Feb 27, 2017 2:51 pm

Hello all!

I need a (clever) way of pause (stop) an sprite instance movement and resume after a while.

Lets say I have 40 sprite instances moving in a line (side by side) up the screen with the bullet behavior. When one of the instances collide with a small quicksand sprite, it should pause for 5 seconds and then continue its movement. I know how to detect if the instance collides with quicksand, but how to automatic order it to pause 5 sec. AND then resume its movement, thats the issue. Maybe some kind of timer?
B
21
S
5
G
1
Posts: 23
Reputation: 1,740

Post » Mon Feb 27, 2017 4:06 pm

Yes, pause and use the Timer behaviour to resume.
ImageImageImage
B
71
S
22
G
257
Posts: 3,790
Reputation: 142,696

Post » Tue Feb 28, 2017 6:47 am

Wow! - never used the Timer behavior before, its absolutely a great tool - thanks alot for the suggestion blackhornet :-)
B
21
S
5
G
1
Posts: 23
Reputation: 1,740

Post » Tue Feb 28, 2017 6:08 pm

Using the wait action would be a lot simpler. Doesn't require adding any new behaviors.

Also, be sure to include For Each conditions or pick by UID if you want only a single enemy to be effected instead of every possible instance.
Zelda Gamekit (my project)



Example capxs:

Zelda-Style Inventory

Zelda Health

3-saveslot system

[url=https://www.dropbox.com/s/d4396pwak0oh7q6/ZeldaDialogueSystem.capx?dl=0]Zelda-like Dialogue[
B
51
S
24
G
30
Posts: 534
Reputation: 19,620


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests