[Solved] Animation issue

Sorry if it’s so simple, but I’m stuck at this!

This code should change the position of my arrow left and right, but it doesn"t work!

What am I doing wrong!

actually, it works. but you dont see the result, because both of the subevents are true. I dont know a solution without testing, but may be try “trigger once” conditions.

Thanks! I tried trigger once and a lot of things, none works. :frowning:

Try setting a direction condition in degrees as shown here:

180 when pressing left arrow and 0 for right. Also, I think it might help to set left & right variables on the arrow object instead of going by “the animation of arrow is…”.

You can use one animation and the flip action as well, based on the direction.

1 Like

Cannot use rotate because my arrow has an effect on top of it. Flip would be great, but it flips only once?


Maybe it will help you. but there must be other better methods.

Many many thanks hoar! It works very good! But so complicate!

Believe me that I had and I have the same problems. :+1:

No, not rotate.

Check the direction of the object by angle is a different condition and doesn’t rotate anything.

If you use flip, it should do so whenever you click the arrow button.

As I said, I tried flip, but arrow flips only once at first click. I used sub conditions for angles 0 and 180 degrees. I guess it happens the same problem as using animations.

I got you. Can you post an updated screenshot of your events so we can try to work out what’s wrong? It’s hard to give suggestions or explain how to fix it when we can’t see what you’ve changed.

1 Like

I will suggest this option.
I don’t know which one he will be using

the “flip direction” isn’t works, because you set the direction fix to 180 (do =180) instead os add 180 (do +180). I think.

this is work for me. or I don’t understand the problem.

OK, This flips arrow to the left. What to do to flip it back to the right?

“Release” condition should take in account the first sprite state, not the last, That’s the problem.

I found a simple way to do it.
Just added an extra empty animation tho the arrow and used the following code.

multiples forms, same result.:+1:

this flip direction is work back and forth, and I wrote down why.

I got it, but as I said, I can’t rotate it, because of an effect I applied on the arrow. If I rotate it, the effect rotates together, and it must stay always on top, that’s why I need 2 animations. Flip would work, but I couldn’t find a way to make it work. Anyway, I’m very happy that we could find out a simple way to do it.
I want to thank all of you for the help.
Count on me!

ok, sorry. but I’m glad the problem was solved.