How do I On touch release

Get help using Construct 2

Post » Tue Oct 13, 2015 2:22 pm

Is their a on touch release. I want to say when a certain button/sprite is released. play animation, set height etc. I know their is a is touching and you can select which button, but when I invert that command it overrides everything else cause it always true. (That command is too strong for my purposes) Please help me Im looking for a similar input to keyboard: when key is released for the touch input.

Thank you in advance the community is good here so i know somebody can help me
B
6
S
1
Posts: 46
Reputation: 476

Post » Tue Oct 13, 2015 2:49 pm

You can make an instance variable that hold if its the selected object when you do the 'not touching ' but to also look for an instance whose instance variable is set to true. So is not touching and object instance variable equal true do this.
B
23
S
4
G
2
Posts: 364
Reputation: 2,392

Post » Tue Oct 13, 2015 2:57 pm

The Touch object has them, it just calls them "on end" triggers.
You need to make the "on end" trigger, then test "is touching" after that trigger to know if it's the right one touched. It sounds like it wouldn't work because it's no longer being touched, but it does work for this very reason.

here is the manual entry:
https://www.scirra.com/manual/119/touch
B
240
S
62
G
33
Posts: 903
Reputation: 40,589


Return to How do I....?

Who is online

Users browsing this forum: Lancifer and 14 guests