is there a "wait"action?

This forum is currently in read-only mode.
  • another question, is there a "wait" action like "wait X seconds/minutes" or "X frames"?

  • Wait object, unstable build (dunno if it's in the stable one).

  • Kind of, there is the "every x miliseconds" object. Using it you can make something wait.

    I will give an example with psuedo code.

    Player presses "Space"

    Player.value('iswaiting') == 1

    if player.value('iswaiting') == 1

    Every 100 miliseconds

    player.value('waittime') + 1

    If player.value('waittime') == 10

    player.value('iswaiting') ==0

    player.value('waittime') == 0

    perform wanted action

    Basically, there are two variables. The one that tells the game if the event needs to wait, and the one that tells how long it needs to wait. Every amount of time tell the game to add one to the waiting time variable, when it equals lets say... ten, that is 10x. If x=100 then that is 1000 miliseconds you have waited, or one second. That is the only way I know how to do it however. I hope this helps.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thanks, that may help as long as wait object is improved

  • Kind of, there is the "every x miliseconds" object. Using it you can make something wait.

    I will give an example with psuedo code.

    Player presses "Space"

    Player.value('iswaiting') == 1

    if player.value('iswaiting') == 1

    Every 100 miliseconds

    player.value('waittime') + 1

    If player.value('waittime') == 10

    player.value('iswaiting') ==0

    player.value('waittime') == 0

    perform wanted action

    Basically, there are two variables. The one that tells the game if the event needs to wait, and the one that tells how long it needs to wait. Every amount of time tell the game to add one to the waiting time variable, when it equals lets say... ten, that is 10x. If x=100 then that is 1000 miliseconds you have waited, or one second. That is the only way I know how to do it however. I hope this helps.

    Instead of doing all that, why not just call a function after delay? You know the Function object?

    Function object on the wiki

    thanks, that may help as long as wait object is improved

    I'd suggest you just use the most recent version of Construct. It doesn't make much of a difference if it's marked stable or not. Version 0.99.84 is being used by many people here on the forum and it shouldn't be considered less stable than 0.99.62. Don't get too hung up on formalities.

  • Yeah, you can do this easily using the Function object!

    Use the "Call Function After X ms".

    Function object rocks!

  • jeje, thanks you very much, i didn't know about that object, it was there all time and i didnt see it :B

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)