Object timer issue

How do I make the title Vat object take damage every 2 seconds a red slime is in collision with it?

Expected result: The vat takes 1 damage for every 2 seconds a slime is in collision with it

Actual result: Timer doesn’t start counting, (assumption is that it’s constantly being started from collision event) if I add once while true only the first instance that collides with the vat is affected


*all slimes in the image aside from the damaged slime phased through the vat

yuou’rec resetting before the dmg count

I would take a slightly different approach. Start the “AttackCooldown” timer for each RedSlime in a "Beginning of scene" event block (or when a RedSlime is created if that happens during gameplay).

Then I’d have one event instead of those two you screen snipped:

Conditions:
RedSlime in collision with Vat
RedSlime AttackCooldown timer > 2 seconds

Actions:
Stop RedSlime
Reset AttackCooldown timer of RedSlime
Apply RedSlime.Damage point of damage to Vat


I think that should work. If not, add a Repeat for each RedSlime as a subevent of the one I described, and move the actions I described into the repeat event.

1 Like

You’re a lifesaver. Thanks!