Game Development Community

Where are the Damagetypes?

by fetze · in General Discussion · 03/16/2004 (12:26 pm) · 2 replies

Hi everybody!

I need to know, where I can find the Damagetypes(in which .cs). If they're hardcoded, It would be good, if anyone could tell me, what damagetypes there are.

Cu
Fetze

#1
03/16/2004 (12:36 pm)
The way I handle this, is whenever you call ::damage, the last parameter is the damagetype. You can call this whatever you want. For example, this is in my onImpact:
%this.damage(0, VectorAdd(%obj.getPosition(),%vec), %vecLen * %this.speedDamageScale, "Impact");
You can change "Impact" to "BigBob". And then in the ::damage you could do:
if(%damageType == "BigBob") {
       echo("BigBob damagetype, or something.");
    }

Edit: oops, forgot to note these would be found in /server/scripts/crossbow.cs
#2
03/16/2004 (9:06 pm)
Ok, thanks for the Info :)