so, I am trying to figure out how to make a high fire rate projectile weapon that heals the player slightly on hit.
I've tried a couple times but nothing has worked and it usually just crashes the game as soon as I launch it..
its led to some funny results, but I'm just trying to make it work at this point.
do any of y'all know what I could do to make this work? thanks!
here is the code for the projectile:
Code: Select all
class HealProj : Actor
{
Default
{
Radius 4;
Height 4;
Speed 20;
Damage 3;
PROJECTILE;
}
States
{
Spawn:
HEAL A 5;
Loop;
Death:
HEAL B 3;
HEAL C 3;
HEAL D 3;
TNT1 A 0;
Stop;
XDeath:
HEAL B 3;
HEAL C 3
{
if (target is Monster)
{
GiveBody(4, 65);
}
}
TNT1 A 0;
Stop;
Crash:
HEAL B 3;
HEAL C 3;
HEAL D 3;
TNT1 A 0;
Stop;
}
}