Hi all
When Var is 2 I want to reduce health by minus one on every second.
When Var is 1 I want to add health by one on every second.
I tried to reduce but this does not work (pic)
hi - its better to use an object timer than a wait for this . so when the variable is 2 - trigger once start timer ‘health’
add another event under the variable =2 - if timer 'health of object is greater than 1 - subtract health and restart the object timer
Your event doesn’t have any conditions so the wait is triggered on every frame. After 1 second the 1st wait expires and then on future frames the other waits will expire in turn. The wait only pauses the subevents. It creates a continuous buffer of waits. A timer would be easier.
Think of it like a line of people. The 1st person starts a line. Every frame a new person lines up behind them. After the first wait expires, the 1st person moves. Afterwards, it’s just a continuous stream of people as each wait expires as they were created.
You could use something like:
At the beginning, start a timer
Timer > 1, reset the timer
… Variable =1 add health
… Variable =2 subtract health
You might be able to use a single scene timer unless your game calls for object level control of time then use object timers.
thank you all
I’ll try and get back

