Can you use the wait action for a event?

0 favourites
  • 8 posts
From the Asset Store
Add calm and a lounge vibe to your games with these 8 tracks
  • I am trying to have it so a action happens after a number of seconds. But you are supposed to delay the events by a couple of seconds by clicking on a certain object. The farthest i got in this is the wait action. The problem is that it only can delay actions placed after it. Not events. The X seconds, the event that makes the action happen is a event and not a action. Can you somehow affect a event using the wait action?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, you can. Add wait and then add a sub-event. See screenshot bellow:

  • Not sure if that resolved your issue but you might want to deal with dt and a variable to solve this. Below is a link. Wait does allow for a delayed event but I'm not sure if you can continue to delay that event by pressing the button again or hitting the object.

    Use this link start at where the bold says every x seconds. It explains exactly what you are talking about.

    https://www.scirra.com/tutorials/450/timers

  • [quote:kdvvt941]

    quote]

    Yes, you can. Add wait and then add a sub-event. See screenshot bellow:

    I did that but it makes the event that is supposed to happen after a number of seconds never happen. Even if don't click on the object to delay the event it never occurs. Appearently the x seconds and go to layout doesn't work as a sub event.

  • Not sure if that resolved your issue but you might want to deal with dt and a variable to solve this. Below is a link. Wait does allow for a delayed event but I'm not sure if you can continue to delay that event by pressing the button again or hitting the object.

    Use this link start at where the bold says every x seconds. It explains exactly what you are talking about.

    What i am trying to implement is that after 10 seconds you go to a different layout. But when you click on a object it delays that whit 4 seconds. That tutorial may show how to do that successfully but i may just not be skilled enough to understand how it shows that.

  • Option 1 will load the next layout 4 seconds after you hit the button, but you can't keep hitting it to reset the timer. This doesn't appear to be what you are looking for as you want to add time to a current timer. So give me a min I'll upload some fixes.

    http://imgur.com/Dd2yzg5

  • Option 2 will do what you desire just have to change some conditions around =)

    http://imgur.com/V8JF8Ti

  • Be careful when playing stuff, things like putting destroy sprite before layout could prevent anything from changing as the sprite was destroyed so it didn't finish all of it's commands.

    If you want it to change layout when score hits 1000, be sure to use defensive scripting and do

    When score > 999 instead of when score = 1000, if they have 999 score and get 2 points you never actually hit 1000 so the event doesn't trigger.

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