How would one go about making a DoT weapon?

Gheist

King of all Goblins
Damage over time. Usually flames, acid, poison, blah.

This thread has a very specific purpose by the way. From now on, everyone: If you can't help with the question at hand (and especially if you're trying to be "funny"), don't bother posting. Nukes will fall etc.
 

Volt Cruelerz

Legions Developer
I haven't done this, so I don't know the exact code for it, but you'd have probably want a recursive method that has a player as a parameter. Each time it runs through, it has a delay before calling itself again with the same parameters with the exception of one which would be the "timer" of sorts. Also, for non-stacking DoT's, you could have it cancel the wait function before calling the recursive method.
 

Immanent

Member
Damage over time. Usually flames, acid, poison, blah.

This thread has a very specific purpose by the way. From now on, everyone: If you can't help with the question at hand (and especially if you're trying to be "funny"), don't bother posting. Nukes will fall etc.

Thanks for nuking although I didn't see the posts. It really irritates me that people think they're awesome just because they get 'likes' for posting "funny" comments.

I haven't done this, so I don't know the exact code for it, but you'd have probably want a recursive method that has a player as a parameter. Each time it runs through, it has a delay before calling itself again with the same parameters with the exception of one which would be the "timer" of sorts. Also, for non-stacking DoT's, you could have it cancel the wait function before calling the recursive method.

I'm assuming stacking DoT's increase in damage over time. Because as it stands, the CG is practically a non-stacking "DoT" weapon up close in combat. So basically is it possible to mod the CG script or LR script (whichever is easier) and make it a continuous hit-scan wep??
 

Volt Cruelerz

Legions Developer
I guess if you wanted to, you could reduce the CD time of the LR to near zero, making something that'd effectively be a beam you could sweep across enemies.
 

Gheist

King of all Goblins
Nah, the CG isn't a DoT weapon at all. DoT means hitting once, then doing damage for a specific time after that. Imagine a poison arrow or something. The usual implementation in a game would be a projectile that deals a small amount of initial damage (as it hits) and DoT (the poison) thereafter. The difference between stacking and non-stacking DoT effects would be, well, if they add up or not. Back to the poison arrow example: It hits, the DoT effect starts, the target is poisoned, what happens if you hit another time? Do the DoT effects add up and deal double damage, is being poisoned twice worse than just once? If the answer is "yes" then you have stackable effects. Non-stacking DoT would mean you can only be poisoned once. Maybe the second hit would increase the DoT duration, but that's it.

If you want a "continuous hit-scan wep" (I'm thinking of Q's Lightning Gun here), just increase the RoF (rate of fire) and decrease the damage, maybe increase the projectile speed for less leading (additionaly: get rid of overheating) . That way would require the least scripting effort I'd imagine, as you just have to change already existing values.

Edit: Ninja'd by Volt Cruelerz, but yeah, what he said. ;)
 

Skutki

Member
Not sure if it makes sense but you could duplicate the health drain from overdrive and just have the weapon trigger that state. I don't code so i cant tell much more. Just trying to give a lead.
 
Top