How do I disable controls while not on platform?

Get help using Construct 2

Post » Fri Apr 11, 2014 5:49 pm

I have the platform behavior Jump set to my left click as well as an animation. I want disable the left click while the player is in the air or falling so it won't play the animation again if the player clicks again while not on the platform. Thanks.
B
44
S
15
G
2
Posts: 104
Reputation: 4,122

Post » Fri Apr 11, 2014 5:57 pm

have a boolean switch, put an instance variable on your player, like canClick.
when clicking to jump also check if canClick = true, then when you jump set the variable to false,
use the event On Landed to set the variable back to true
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Fri Apr 11, 2014 6:41 pm

Thanks for the quick reply, being a Construct 2 noob I was having a bit of trouble figuring out how to check if canClick was true, I thought it would be under an action for the player, but I figured it out, I just added the Is boolean instance variable set condition to my mouse click action event. Works great now, thanks again for your help.
B
44
S
15
G
2
Posts: 104
Reputation: 4,122


Return to How do I....?

Who is online

Users browsing this forum: Magistross, tarek2 and 2 guests