[SOLVED] Increasing Acceleration

Ok, so this next stage I’m doing is on a skate board, so I wanted to play with the acceleration. I’m trying to have the MC increase in speed the longer you hold down the directional button up to 4x it’s speed. But for some reason it wont go faster than the original speed set on the MC. Here is a snapshot of how I’m trying to do it. Any help would be great

Thanks

Just to experiment… all the events after you’ve triggered the timer, try to move those acceleration events to normal events and see if that triggers them.

Because I think those events are just reliant upon the timer being triggered, but the timer itself is reliant upon the D button being pressed. So another idea, you might try adding condition “D button pressed” to each acceleration event.

Ok, so I moved them outside to normal, still didn’t work. So I tried setting it to a variable, to where when the variable changes, it resets the timer “Trigger once”, still didn’t work.

So I wondered if doing it directly would work, where I don’t even ramp up the speed, I just have it set to something ridiculous like 9000, and it STILL didn’t work. So I guess it’s not something with the timers. It wont let me change the Acceleration at all. Only in the actual sprite behavior. Here is an example of the test I did, that still didn’t acceleration above 500

Instead of set to, did you try add?

Still not working :confused:

gonna do a restart, hope that fixes it lol

Even when I add acceleration without a condition, nothing happens.

edit: I have nothing else that touches acceleration, so nothing should interfere with it

Did you try setting up and pausing the timer at the beginning of the scene?

Then reset/unpause timer when you want to trigger it

I got rid of the timer, and Just did a conditionless action of adding acceleration, and it doesn’t change anything

Just straight up

edit: tried it with a “set to” as well

If you’re ok to share the game folder I’ll take a quick look

I appreciate the offer, But my internet is realllllyy slow on upload speed, and 4 levels in my game file is almost half a gig, it would take an hour just to upload.

edit: Unless all you needed was the .json file

Just the json and the sprite that you need to accelerate should work i think… or just the json should be ok, i’ll use a substitute sprite

Ok, here is the .json file… It’s only stage 4 I’m trying to get this to work (only one he has a skateboard in)

http://www.mediafire.com/file/4wbwlxh07d6odrw/Dont_play_the_game+-+Copy.json/file

btw, sorry if it’s a mess, this is my first game I’ve ever made. But it should be under the “movement” group

The game’s too big to test properly without all the files included in the folder (I didn’t realize your events were up to this point, had assumed it was a smallish game)…

I understand. I appreciate the try though :slight_smile:

But nope! I plan to have a total of 7 stages, so I’m about halfway there right now. I’ll be happy to link to the game when I’m finished though! (if you wanted to play it)

If you’re able to include the relevant sprite and some background for me to easily reference the speed, then that might be enough to work on

Just to clarify… You have a platformer object with an initial acceleration of 500 and you want when you press the D button for every 0.2 seconds to accelerate by 250, right???

Yep! But for some reason it just doesn’t want to apply the acceleration.

I’m not sure how to send specific sprites, I might just put in a placeholder speed for now until I can figure out what’s going on

You could use TimeDelta() instead of timers… Let me put something together quick and send it…

I appreciate it, but the timers aren’t even the biggest problem. Even when I apply the acceleration without a condition, it still doesn’t work. for some reason it just doesn’t want to change the acceleration.