Logic Wait

Is there any way to put a delay between a sensor and an actuator? I want to make it so someone pushes a button or something, then something happens a few seconds after. Help? :spin:

You can use a timer property.

Example (1 second delay):


Where would the action to be delayed go in this example?

Wired to the same output as the assign property to 0 one.

make an prop named “time”
do it in this way: when a key is pressed the timer is set to -2 , then make a prop that is activating when the time is in an intervall betwen -1 and 0. let this prop trigger your action and you will have 1 sec delay betwen the sensor and the acuator
for longer delay put something bigger than -2.

good to know about this is:
the timers always starts at 0, therfor we set them and their triggers to a negative value, othervise they will run at the game start
you NEED to set an intervall and not an equal to, bco the ge sometimes misses equals when messuring time.

sry for my bad eng

this don’t work, it makes an delay befor the buttom is pressed, not after it have ben pressed

:spin:I think I’m going to get sick from watching that guy spin…

You can use states.
on first state the key changes to a different state. In the other state add the delay and action + return to initial state.
So whe the key is pressed, the logic changes state, delays for x time then executes the action and returns to initial state.

Multiple methods:

A) Timer property + Property sensor as dberube4 and esoneson suggest.
B) any property + Property sensor + counting the property as dberube4 and esoneson suggest.
C) Delay sensor

For cleaner structure you can use states as torakunsama suggests

The states thing worked. Thanks everyone! :slight_smile:

In my game, a property actuator detects if a health value equals 0, and if it does actuators subtract 1 from a Lives value and add a “Game Over” overlay scene. Three meshes (shaped “one”, “two”, and “three”) in the overlay scene copy the Lives value to a value of their own and check if their value matches their respective shape. So if the Lives value goes down to 2 in the first scene, the overlay scene should appear and the “two” mesh should become visible. Currently, the overlay scene appears but the meshes do not. I think this has something to do with copying Game Properties across scenes. The values for the three meshes start at 0. Help?

Sorry meant to start new thread.