How do I change animations in events

Get help using Construct 2

Post » Sun Mar 02, 2014 5:28 pm

Hi all,

I have a problem with my project.

Please have a look at the screenshot i joined with this topic.

The problem is, when I touch a "scissor' or 'rock' playing for buttonleft or buttonRight, there is no problems.
When i touch a 'paper playing' button, it doesn't work well : 'player' never becomes 'paper'.

I checked everything, I don't find any mistake...

All my animations are looping.

thank you !
You do not have the required permissions to view the files attached to this post.
B
5
Posts: 12
Reputation: 249

Post » Sun Mar 02, 2014 5:30 pm

Sorry for the attachment file, it is too big... but every 'set animation to' ends by (from beginning)

I checked with debug and all conditions are good, but for paper, even with good conditions, it's not good events...

Not sure if this is a bug or if I did something bad...
B
5
Posts: 12
Reputation: 249

Post » Sun Mar 02, 2014 6:43 pm

I think I know the problem, but it's hard to explain for me. But I'll try.

When you touch the button, while paper is playing, construct notices the touch and sets the button's animation to rock. Now construct goes on checking for events (upper events before lower events, since it's a script language). Two events later it checks for "Animation "rocks" is playing. Since we set the animation to rocks right before, this event is also triggered and sets player back to "rocks".

I'm not 100% sure about the solution, but try this: Make A System->Wait 0 event right before changing to another Animation.
B
14
S
3
G
1
Posts: 255
Reputation: 2,027

Post » Mon Mar 03, 2014 12:47 pm

Ok thank you for answer, I will check this ASAP.

But why only for paper ? I don't know :(
B
5
Posts: 12
Reputation: 249

Post » Mon Mar 03, 2014 12:52 pm

Cause the paper touch is handled before all other touches.
B
14
S
3
G
1
Posts: 255
Reputation: 2,027

Post » Wed Mar 05, 2014 7:26 am

Thank you man, you solved my problem!
B
5
Posts: 12
Reputation: 249


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests