Frictional Games Forum (read-only)

Full Version: Ticking damage
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have this water/acid area and when the player enters it I want him/her to take ticking damage. Is this possible? The damage should also stop when he/she leaves the area.
Yeah....Here's how you'll want to work it out:
Add a collide callback with the slime area that tracks both entering and leaving states and is not removed automatically. Then just check which state the player is (1 for entering, -1 for leaving) and either start a looping timer which gives the player some damage or stops the timer using RemoveTimer().
(12-20-2011, 05:21 PM)palistov Wrote: [ -> ]Yeah....Here's how you'll want to work it out:
Add a collide callback with the slime area that tracks both entering and leaving states and is not removed automatically. Then just check which state the player is (1 for entering, -1 for leaving) and either start a looping timer which gives the player some damage or stops the timer using RemoveTimer().
If that doesn't work too well you can always change the script type to SlimeDamage. This isn't as reliable as what palistov said, but hey. It's another way to do it.