How do I play the whole animation on touch

Get help using Construct 2

Post » Fri Apr 18, 2014 2:50 pm

Hello everyone! The problem is in animation control. I am using Spriter plugin for C2 and the thing that I need is that on touch the whole animation must be played (punch in action game). In my situation it's become to start to play and then if you continue to put pressure on the button it is playing. What I need is that must play the whole animation in one touch. How to design this?
B
7
S
1
Posts: 73
Reputation: 603

Post » Fri Apr 18, 2014 4:01 pm

i am not quite sure i understand what you want but i will give it a try.
either
'button' is in touch
trigger once.......................... play spriter animation.
or add a boolean instance variable to the button named 'punching'
button is touched
button 'is not punching'............ play spriter animation and set 'punching' to true
on spriter animation 'punching' finished ........ set 'punching' to false
B
15
S
6
G
4
Posts: 277
Reputation: 3,948

Post » Fri Apr 18, 2014 5:41 pm

Roccinio wrote:i am not quite sure i understand what you want but i will give it a try.
either
'button' is in touch
trigger once.......................... play spriter animation.
or add a boolean instance variable to the button named 'punching'
button is touched
button 'is not punching'............ play spriter animation and set 'punching' to true
on spriter animation 'punching' finished ........ set 'punching' to false


Thank you very much!
B
7
S
1
Posts: 73
Reputation: 603


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 12 guests