How do I make an "if true for X seconds" condition?

Get help using Construct 2

Post » Thu Aug 13, 2015 10:29 pm

So I have a sword, it is swung on left click, but I want it to be put away if left click has been held down for too long so the player needs to click again. If I set the actions to swing: "change angle" and then "wait X seconds" and finally put away/ unswing "change angle" it puts the sword away, but it also does on the players next swings. So what can I do instead of "wait X seconds", is there an action or condition like "if true for x seconds" or a way to make one?
B
2
Posts: 1
Reputation: 152

Post » Thu Aug 13, 2015 10:35 pm

You could use timer
Image Image
B
25
S
14
G
139
Posts: 877
Reputation: 72,512

Post » Fri Aug 14, 2015 7:06 am

Set a timer when the left button is pressed, put it away on the timer event, stop it when the left button is released.
My tutorial through development blog is at http://myconstruct2dev.blogspot.co.uk/
B
12
S
3
Posts: 221
Reputation: 1,328

Post » Fri Aug 14, 2015 11:16 am

That's pretty simple to make dear friend, then get to work is only risking set up something and see what is going, it works for me most of the time when I would do something I'm not getting many attempts certainly brings some useful result.
B
32
S
9
G
3
Posts: 280
Reputation: 4,262


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 24 guests