Is there a wait command that you can use to pause actions?

This forum is currently in read-only mode.
From the Asset Store
In this game you will command the character by voice command.
  • If not, can you make one using the system clock?

  • You can use the system clock if you want to.. but you'll need to setup variables. I believe there is a wait plugin, and also you can use the function plugin and call a function after a delay (in ms)

  • Um, how do I actually get the time?

  • i think the date object can do it?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sorry, I meant the server time.

  • There is a wait object that can put a delay into actions. It depends if you are trying to simply delay something within the action, or if you want it paused indefinitely.

    To delay an action:

    On <some condition>

    --Do: create sprite1 at x,y

    ------ play sound "somesound.wav"

    ------ wait 2,000 ms

    ------ change animation to "DoneTaunting"

    If you want the action paused indefinitely, then I have no idea how you might do that. I would look at using some kind of toggle condition rather than trying to switch at the action level. Something like:

    Is global('Something') = 1

    --Do: Set global('something') = 0

    If you don't set it 0 immediately, then this action will repeat every tick (unless that's what you want it to do).

    ---- do other things

    On SomeOtherCondition

    --Do: set global('Something') = 1

    Note:

    I've found that wait acts strangely in loops. What I *think* is happening, is that each iteration of the loop starts another wait cycle in parallel, effectively nullifying it.

    If I did:

    ON SomeEvent

    --Repeat 12 times

    ------- spawn an object

    ------- play a sound

    ------ wait 1000ms

    I find that all 12 appear instantly, and all the sounds play seemingly at once. It's as though 12 'waits' are created simultaneously.

  • You could try timescale here.

    Unfortunately it effects everything that uses timedelta. Hopefully that will be remedied in C2.

  • Hah, yeah I was messing around with timescale a couple of days back. That was fun. I like the way sound effects slow down to match.

    I'm glad I've tied all my events into timedelta now. I could have a slo-mo powerup that gives bullet time properties to my game. The firing control isn't in timedelta yet, but I think I'll leave it that way because of the way it turned out.

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