Change speed + change animation speed for 1 state

Hello there !
I’m currently making my player evolve and get new upgrade.
He now can do infinite jumps. But i’d like to make the animation faster when he get the upgrade (I use a boolean for the upgrade that know if he can use the upgrade or not) Is it possible to manually make the game understand that if the boolean = 1 then the animation is sped up (only the jump animation not the others) I tried many ways but none seem to work…
I would like to speed up too his speed (going for exemple 50 speed to 100) but only for this animation too
Is it possible ?
If you need screenshots, tell me ! :slight_smile:

If you want a specific animation to go faster than usual, then maybe you could use this action:

I guess you’d use this action only if your boolean variable is true.

When it is false, you’d set the scale back to 1 (which is the normal speed).

Finally, if you want to manually change the maximum speed your player can reach, then it depends on the behaviours of your Player object. If you attached the “top-down movement” behaviour then you could increase the maximum horizontal/vertical speed for example. For a platformer character I’m not sure but it’s probably somewhere in the settings, so there should be an action for it.

In fact My boolean Value is set to 1 when I got the Infinite Jump and when its 0 I only can jump once
So I tried many things but it does not seem to work
When I set like : Boolean = 1 Animation is jump left or right → Speed scale 2, It works
But when I add onto another event : Boolean = 1 animation ISNT jump left or right → Speed scale 1
It does nothing at all…
About the speed I use a platformer character so I don’t have the option to change speed, only in the behavior but it’s in general…

To change the speed of a platformer character, you have to change the “maximum speed” :

Change the horizontal speed, but you can also change the falling speed if necessary.

Please show a screenshot of your events concerning the speed scale of your animations. Maybe you made a mistake. It would help to see the events.

There are my events :

Imma test for the speed and tell you ! :slight_smile:

On your first event, you have a OR condition:

Left OR Right

which gives true if the player is going left, or if he’s going right, or both (which cannot happen since both conditions are incompatible).

On your second event, you have an inverted OR condition:

NOT (Left OR Right)

If your player’s going left, then “right” is false, since the two are incompatible, so you have: NOT (true OR false) which gives false.

If your player’s going right, then “left” is false, so: NOT (false OR true) which gives false.

Therefore, when your player is going left, or if he’s going right, then your condition will always be false, and so it will never be executed.

To invert a OR condition, you have to use a AND condition, and invert each sub-condition.

So I do need to let “Or” for the first and then “And” for the second with the sub conditions inverted ?
Because it works for speeding to 2 but not returning to 1

Yes, keep the OR for the first event, but invert the second as I told you

It does not work, When I apply what you said, it continues to be on the scale 2 not 1

Please, show screenshots of your events.

Also, I’m not sure if you know about the debug console. Try printing out messages in the console so that you can test and see by yourself if a particular action gets triggered or not, and when.

Here is my code :

No I don’t know about it, how do I enable it ?

EDIT : the Variable to set is Space_Jump but it changes nothing, still doesnt work

Hi, I’ve already explained a lot about the Debugger in another topic: Set animation to last frame/first frame - #4 by thomas_gysemans

Basically, it allows your events to communicate with you about the state of your program at a specific moment. If, for example, you tried to print a message in the console as an action of your second event (of your screenshot) then you’d see if it gets executed at some point. Maybe, for some reason, the action “Change the animation speed scale of Player: set to 1” is never triggered, but, if you print a message below it, and observe that message being printed in the console, then it would mean that your program is indeed executing the action and that the problem is somewhere else.