Persa's Recent Forum Activity

  • Hey guys so I had to taken a break from this project.

    But I went back to it and realized I am still stuck at where I was.

    The break did not help with coming up with some other solutions, anyone else able to come up with something that may be able to make this work.

  • lol thank you Ramones.

    I had realized that right after I submitted that post.

  • Ok, so I messed with increasing the cars max speed and that is not working too well either.

    And when I hit the keyboard that cars speed is set that high for the duration. and it wont slow down even if I try to hi the brakes. Should I make a global variable of boost and have that set to 1 when the keyboard is pressed and have that duration of car speed set higher?

    Or is there a simpler method of doing this that I am over looking?

  • Hey guys!

    It worked and now I am able to control boost and set it to the keyboard input, (along with some other fixes to stupid things we wont tell anybody about )

    But now for some reason when I do this it doesn't seem to be actually boosting the car. I have the event as:

    Keyboard pressed -> car-> set speed to x ( I currently had it set as high as 5000 to see any changes)

    But it doesn't seem to actually increase the cars speed.

    Do I need to set the cars speed to increase for a set period of time for it to register? Because my current guess is that the speed only increased for one tick, and that is too small for the boost to actually affect the car.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • So what was your solution?

  • I would say use a new layer with 0% opacity and then use an event to move it to the layer that you want and then once action completed move it back to the 'Invisible layer'

  • Hello!

    So I have been making a racing game and I have gotten nearly all of it down except for the boost function.

    I have a boost bar that is an animation and stays on the HUD. Now I have a keyboard input (and will later implement touch controls as well) and the boost is controlled by the pressing of the Spacebar.

    In the event sheet I have a global variable that matches the total animation frames (9) of the boost bar and when the space bar is pressed I want it to decrease the frame by one.

    For some reason I am not able to decrease the frame by 1 all I am able to do is start/stop the animation.

    I would like this because I also have an event: once the frame is changed on the boost bar animation the car speed in increased and the global variable Boost is decreased by one as well and once it is depleted it would refill the boost. Right now it is just refilling automatically as the animation is started and is stuck in a perpetual boosting of the car without even pressing throttle.

    TL;DR I am trying to control an animation to go down by one as a space bar is pressed.

    And Any hints on how to set the boost to reset every lap would help alot too (but that's extra)

Persa's avatar

Persa

Member since 7 Jan, 2014

None one is following Persa yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies