[SOLVED] Change Player Speed

Hi, I try to make my player change speed to go faster after a certain amount of time (4 seconds as the timer show)
But It doesn’t work…
The code :

What is strange is that I managed to do it for another animation (works well)
The code :

Try adding the condition to the last event:
[the timer ‘RunBooster’ of player < 4 seconds]

I have no idea what you did there
But this does not seems right
image
Max horizontal speed 2 times

I just failed one was meant to be horizontal acceleration but it changed nothing still :confused:

Already done and change nothing :confused:

moving the Start (or Reset) timer to a different location in the action event window.

Do you know if the conditions are being triggered?
Place something in each event like a debug print.
That will narrow it down to either these events or another event undoing the changes.

I’m assuming you have a lot of conditions that adjust the speed and change the animation. Any number of those events could possibly interfere with your boost.

How can I make a debug print to show it ?

There is some conditions affecting the speed actually on some animations for keeping the speed a 160 and not 40 as if I was in the walking animation
I tried to delete some associated with the idle and running position, but none happened…

Sorry, i was referring to log a message to the console. It goes by different names in different apps.

Any action on the lines will give you feedback as to whether an action is being triggered. The console will give you a more percise order of events but a simple play sound or text in a text object will confirm that the desired action is being triggered and how often.

If there aren’t more conditions than this would reset the speed because running isn’t walking left or right. IDK if these are sub-events but they might need to be more specific.

Are there more walking animations? Then maybe it needs a state Boolean like isWalking or a check like does the animation name start with “walk” that would narrow the focus to just the walking state and then you could check for the left or right.

It can be tough to debug someone else’s project.

i would disable the second part of your first screenshot condition first to check if your boost set of conditions works.

second i would check your global because at least from your screenshot the next step it will have the same value and your timer may not reset bcs trigger once…-.just saying i would chek one part at time bcs that animations conditions are suspicious

also i see you’re using platformer behaviour then…why not check with is moving and is not moving conditions?

I managed to make it work (now walk animation doesn’t work but i will be an easy fix ig ! Thanks all ! :smiley:

Still a question tho, I though my problem would be solved more rapidly but in fact : no :cry:

I changed a few things so it’s easier to manage the speeds :

Here are the speeds values where I change the speed :

“Walk” in the general state :

“Walk” in the idle to walk state :

The walk state :


The SpeedBooster working code (as usual like all my upgrades, in the general state) :

There is no other speed value…

I see you’ have removed the trigger once buut ofc problems still happens.

While i understand that your putting efforts to fix your problem…(and it’s great)…
i see a lots of errors in your screenshots…

it’s more a problem of knowledge rather than fix things.

You’re doing exactly the opposite of what FSM (full state machine) do.

Why are you checking each time which animation character is on instead to check which State/condition he’s on. (moving, jumping, running ecc…)

Just saying while it can be fixed, this kind of approach will cause a (veerry) lots of problems (and mostly unfixable things) later.

also i suggest to use globals to check keypress. Like create a global for RIGHT keypress…then use external events to define that global by keyboard or joypad keybinds.

I would definitely change method and start everything from scratch again…

Harsh…i know…but useful

There is 2 years of work here, I can’t restart again

1 Like

ok let’s say i have this…

it seems you wnat that action to happen whne character stops…rigtht?
Do you have any other animation that could happen at the same time the ones excluded in that situation?

I would do everything i can to simplify that to

If character is not moving (or is not running?) do ---->things

1 Like

I thibk you missed something, it works perfectly well, I’m now speaking of the animation Walk that doesn’t work anymore lol, re-read the last post I did ^^

where?
you mean the boolean?
or the juimp speed?

The animations works fine, the problem is that the speed (160 in “normal” and 40 in “walk”) doesn’t work and my player keep walking at 160…

have u tested one spped at time i mean the 320 works?