Hi Dralel, here's a script that would do it:
--[[
Script by Inertia - deals damage while player is in trigger zone
Edit trigger zone to use this script instead of plrinzone.lua
--]]
local damage = 1 -- Damage player by this amount every interval
local interval = 1000 -- Deal damage every 'interval' milliseconds (1000ms = 1s)
local start = 0
function plrinzone_hurt_init(e)
end
function plrinzone_hurt_main(e)
if g_Entity[e]['plrinzone']==1 then
if start == 0 then -- activate first time player enters zone
StartTimer(e)
start = 1
end
if GetTimer(e) > interval then
HurtPlayer(e,damage)
StartTimer(e)
end
else
start = 0
end
end
So to use this, just put a trigger zone down where you want the damage to occur. Edit the trigger zone so that this script (name it 'plrinzone_hurt.lua') is used instead of the default plrinzone.lua. Stretch the trigger zone to fit the area needed. The first two variables at the top of the script can be changed to suit your needs: 'damage' is the amount of damage dealt, and 'interval' is the amount of time in milliseconds that damage is dealt.
Hope this helps,
Rick
Win7 x64 | i5 @3.3GHz | 4GB RAM | GTX580 1.5 GB