How do I fix this?

0 favourites
  • 5 posts
  • I've got these two events that aren't working correctly. Well the first one does but the second one not so much.

    First the player attains a Hyper Orb and it turns a Global Variable to 1. Once it's 1, then the next event follows with the actions. But the actions are not being executed correctly. The first 4 actions of the second event are executed then the rest do not. The game just stays in a Timescale of 0. What am I doing wrong? It all looks logical, at least from my perspective....

  • I wonder what would happen If you set the timescale to 0.01 rather than 0 and the wait t0 0.04 rather than 4 ...and why...

  • Yup - you've asked the event to wait 4 second at a timescale of zero.... Try setting object time scales instead of system time scale.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ah, thanks you guys!

    Also, I wanted to add a skip button to skip the introduction to the game, basically ignore the entirety of the 2nd event. When the skip button is pressed the skip button is destroyed and the Hyper Orb Action is set to 3. That doesn't stop the 2nd event from executing. Should I basically put:

    HyperOrbAction= 3 > Instruction Text Destroy

    Instruction Text Is Inside Layout TimeScale set - 1

    Does that make sense?

  • It's because you're checking the var just once when you trigger the whole event, so it continues running regardless of the value of HyperOrbAction, you can break your events into sub-events and check the var status after every wait before continuing to the other actions, or you can add your own timer var (just a number that you add 1 to every second) and then you'll have more control over it, for example, instead of putting wait for 4 seconds, you do this, set var timer to 4 and another action after that system/wait for trigger("timer"), on your counter event when it reaches 0, you signal the wait trigger ("timer"), then if you want to stop counting, just set the timer to 0 or -1.

    Btw, the internal wait action will also continue counting and executing the event if you'll restart the layout, which is also annoying at times, that's why I always do my own timer, or use stuff like on fade ended, on audio ended, on animation ended, etc.

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