Jump to content

Help: Trying to figure out how to script Damage over Time.


kryth

Recommended Posts

Can anyone help me or point me in right direction. I'm trying to write a script that will do damage over time. My issue the 'overtime' part. Tried on OnHit, OnHitWith and ScriptEffectStart block type, but can't figure it out. Plan is to attach it to either the weapon or the ammo. Below is what i thought would work but it only does the initial damage. I'd also like to be able to adjust the duration and how often the damage ticks.

 

 

scn DOT

float ftimer
begin scripteffectstart
set ftimer to 0
end ; scripteffectstart
begin scripteffectupdate
if fTimer > 0
set fTimer to fTimer - GetSecondsPassed
elseif iStage == 0
DamageAV Health 100
set iStage to 1
set fTimer to 3
elseif iStage == 1
DamageAV Health 100
set iStage to 2
set fTimer to 3
elseif iStage == 2
DamageAV Health 100
set iStage to 3
endif
end ; scripteffectupdate
Thanks
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...