SYSTEM Wait Problem -.-

0 favourites
  • 8 posts
From the Asset Store
Create complex dialogues with ease with this tool/template!
  • If I go to an enemy, I lose a life. If I lose my all lifes, nothing happens. So I wanted this: If I lose all my lifes, my character goes invisible, and I need to wait 0.5 secs, and my character respawns. So. I tested it. I lose all my lifes. My character goes invisible. Wait. Wait 1 sec. Wait 3 secs. Wait 10 secs. And my character is still invisible. After 15 secs, it respawned. WHAT THE HELL IS THAT ??????..... I tested again the game (Not changed anything) and I waiting. I Waited 5 secs, and my character respawned. Testing again, I waiting, and my character respawned after 7 or 8 secs. WHAT THE HELL IS GOING ON ???????

  • You should let us see your work - wait is a commonly misused event.

  • I tested it again, and if I lost my lifes, I goes invisible. and nothing happpens. and if I go to the enemy again, then I'm visible. Don't understand.... someone help please

  • your condition is true every tick, so every tick Slime3 goes invisible add condition "trigger once while true" should solve your problem

  • I had trouble with "Wait" commands until I started nesting them.

    For example:

    SYSTEM — Lives = 0 | Slime3 Set invisible

    ....................................| Wait 0.1

    ........................................................| Slime3 Set visible

    Bad diagram, but I hope you know what I mean to indicate in the editor.

    I find the "wait" command only does actions that are nested under it.

  • DogexOff, MadSpy is correct. So I won't go on more detail on his work.

    I will however mention that it's poor design that your checking every tick for Lives==0. You should check if Lives == 0 only when you lose the life in the first place.

    I suggest

    On ObjectFoo Collides with character

    -- character.life subtract 1

    -- If character.life == 0

    ---- character.setVisible(invisible)

    ---- wait x

    ---- character.setVisible(visible)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • DogexOff, MadSpy is correct. So I won't go on more detail on his work.

    I will however mention that it's poor design that your checking every tick for Lives==0. You should check if Lives == 0 only when you lose the life in the first place.

    I suggest

    On ObjectFoo Collides with character

    -- character.life subtract 1

    -- If character.life == 0

    ---- character.setVisible(invisible)

    ---- wait x

    ---- character.setVisible(visible)

    Great tip. Thanks cause this helped me out too

  • Thanks people, now it working!

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