0 Favourites

How to add to max speed over time?

  • So I'm making a small platformer,

    and I want to make it so that when the player has been moving for more then 5 second, +1.0 is added to the max speed.

    I was thinking something like,

    "if player is moving,

    than every 5.0 seconds add +1.0 to max speed."

    but I can't add +1.0 to max speed, because I get a syntax error when I try to input +.

    So does anyone have a idea on how I could achieve this?

    Also, I'm just using the platformer behavior, and the current max speed is 230.

    (Also, I searched around the forum but didn't find anything, sorry if this has been answered before)

  • No syntax error for me:


  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Every time if you want to add or subtract something to existing value you have do put that value first.

    if you eant to change opacity over time you can't put:

    Set opacity to +1

    You have to do:

    Sprite: Set opacity to Sprite.opacity+1 (it says - current opacity value +1)

    same for size, speed, position etc.

    and make sure you use time delta to change value over time with the same speed for faster and lower framerates

    Sprite: Set opacity to Sprite.opacity+1*dt - it will add 1 to current opacity every 1 second

    You can use "self" instead of instance name

    Sprite: Set opacity to self.opacity+1*dt

    ps. i have no idea why i used opacity in that examples ;)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
234 61,259
DARKSETH's avatar
Unread hot topic
0 Favourites
Time to move forward?
110 9,563
GG-Works's avatar
Unread hot topic
0 Favourites
[PLUGIN] Time manager
76 33,829
SondeepH's avatar