i am trying to make something a bit like the TF2 medigun, but everytime i shoot it at a player their blockland all frezzes up, whats wrong with my code, and while i have you hear, how would i make it go up by about 2 health every time the projectile hits you, rather than straght to full health?
function MediProjectile::onCollision(%this,%obj,%col,%pos,%fade)
{
if(%col.getClassName() $= "Player" && %col.getDamagePercent() < 100)
{
%col.setDamageLevel(0);
%col.emote(medigunhealImage);
%col.delete();
}
return;
Parent::onCollision(%this,%obj,%col,%pos,%fade);
}