TheJaky
December 9, 2021, 11:37pm
#1
So, I already know how to flip animations. (I had help solving this here: Problem with flipping animations )
But I have a lot of animations to flip. Like a LOT LOT. I tried to make a function that would flip any animation that you put into it, and it failed
So when the function is called, it also sets the 4 other variables
The animation is an array and the first thing (in this case the animation is called gank spank, I was tired)
The second one is just whatever sprite you want to apply the flipped animation to, and here itās the player
The third one is just the interval at which the animation plays
and the last one is supposed to determine whether the animation is a loop or not
But when I tested the code, it said that it ācannot read properties of undefined (reading iface)ā
I donāt know what iface is or what is undefined. I need help with this, please!
tried it myself. got it to work. just donāt clone the photo (for some reason it didnāt work)
1 Like
I just use the velocity stuff. Thatās my best bet. I do that to be safe to avoid these super complex situations. (Just a suggestion)
1 Like
TheJaky
December 10, 2021, 5:43pm
#6
happy birthday drtongue96
but your solution didnāt really work, it kind of just has the same problems as my first post about flipping animationsā¦
It worked. Passed in the animation and it reversed it. What you could do is create a less complicated function to pass in an animation and then in the function itself RETURN the reversed one, then you donāt need all those extra parameters.
TheJaky
December 10, 2021, 7:37pm
#8
well for me, it just flipped it everytime the button was pressed
TheJaky
December 10, 2021, 7:37pm
#9
also what does the return function block do? I never got to figuring that out.