Button Triggering problem

Discussion and feedback on Construct 2

Post » Tue Sep 25, 2012 10:37 pm

Can you see what's wrong in this code - I'm stuck with it.



I'm trying to control a triggerable object with a button. When the button is pressed, then it finds the Triggerable Object with the TargetID and it sets IsTriggered. This works fine.

When the button is let go, then it should do the same - find the Triggerable Object with the TargetID and set IsTriggered to false. But this is not working.

Any ideas?
B
11
S
4
G
3
Posts: 70
Reputation: 3,071

Post » Wed Sep 26, 2012 10:00 pm

Well, I've solved it - by checking against the animation frame of the button (is the button down as well). But I still don't see why it doesn't work as written.

(Although it's neater now since previously the event system was spamming away on every button that the player wasn't touching)
B
11
S
4
G
3
Posts: 70
Reputation: 3,071


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 6 guests