![]() |
[SCRIPT] Ticking damage - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: [SCRIPT] Ticking damage (/thread-11965.html) |
Ticking damage - i3670 - 12-20-2011 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. RE: Ticking damage - palistov - 12-20-2011 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(). RE: Ticking damage - flamez3 - 12-20-2011 (12-20-2011, 05:21 PM)palistov Wrote: Yeah....Here's how you'll want to work it out: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. |