How do I resolve my problem?

Get help using Construct 2

Post » Mon Jan 30, 2017 3:18 pm

Hi guys,
I want change animation when I click a button (click_trapano) and when the character is on floor, in to "trapano" animation.
I have done it, but I don't know why is not working! :cry:
Image
Can you help me, please?
Mamma mia buongiorno guys!
B
18
S
8
G
7
Posts: 12
Reputation: 4,874

Post » Mon Jan 30, 2017 3:21 pm

How many frames are in "default" and "trapano" if I may ask?
Did you set them to looping?
Image Image Image
B
31
S
11
G
27
Posts: 748
Reputation: 17,093

Post » Mon Jan 30, 2017 3:29 pm

MPPlantOfficial wrote:How many frames are in "default" and "trapano" if I may ask?
Did you set them to looping?

Default has 8 frames, but for now I don't have the loop because all the default's frames are same (I wait for to create the graphic).
Trapano has only a frame.
Mamma mia buongiorno guys!
B
18
S
8
G
7
Posts: 12
Reputation: 4,874

Post » Mon Jan 30, 2017 4:42 pm

By not working, I am assuming you mean it is still showing the default anim? Usually a bug like this is caused by the set default animation overruling the button click logic elsewhere on the event sheet. Do you have any other conditions for setting the default animation that might be constantly true, so if you clicked the button it would still switch back to the default animation?
B
46
S
16
G
79
Posts: 2,170
Reputation: 46,857

Post » Mon Jan 30, 2017 5:00 pm

plinkie wrote:By not working, I am assuming you mean it is still showing the default anim? Usually a bug like this is caused by the set default animation overruling the button click logic elsewhere on the event sheet. Do you have any other conditions for setting the default animation that might be constantly true, so if you clicked the button it would still switch back to the default animation?

mmh..yeah, the default animation is working.
An other condition is this, but I don't think that this is the problem.
Image
Mamma mia buongiorno guys!
B
18
S
8
G
7
Posts: 12
Reputation: 4,874

Post » Mon Jan 30, 2017 5:04 pm

It looks like that is the problem as it says play animation Fermo whenever the player is on the floor. The event you're trying to do above states when pressing a button and on the floor. So if you're stood still on the floor and click the button it won't do anything except play animation Fermo.
B
46
S
16
G
79
Posts: 2,170
Reputation: 46,857

Post » Mon Jan 30, 2017 5:20 pm

plinkie wrote:It looks like that is the problem as it says play animation Fermo whenever the player is on the floor. The event you're trying to do above states when pressing a button and on the floor. So if you're stood still on the floor and click the button it won't do anything except play animation Fermo.

Oh yeah, I have delete the second condition and now it's working! Thanks! :)
But now how I can use "Fermo" animation when the character is on floor and is not moving? :roll:
Mamma mia buongiorno guys!
B
18
S
8
G
7
Posts: 12
Reputation: 4,874

Post » Mon Jan 30, 2017 5:39 pm

Try some conditions 'when Trapano animation is not playing', or you can lock it out by setting a variable when you click the button.
B
46
S
16
G
79
Posts: 2,170
Reputation: 46,857

Post » Mon Jan 30, 2017 10:11 pm

perfect, thanks everyone! :D
Mamma mia buongiorno guys!
B
18
S
8
G
7
Posts: 12
Reputation: 4,874


Return to How do I....?

Who is online

Users browsing this forum: 25games, jatin1726, kiki4construct, Username05 and 32 guests