Author Topic: Doing damage to the player that fires the weapon.  (Read 361 times)

I'm trying to make a weapon that Is very powerful, but when you fire it: it drains some of your health.

Is this possible? What would work?

possible, try spawning an explosion at the barrel/hand, or what ladios did with the rocket laser thing when you charge it too much

Could I do something along the lines of:

function WeaponImage::onFire(%this,%obj,%slot)

%obj.client.player.(subtract health here?);

I don't know what I would put there, if I wanted to do this.

%obj.damage(player object damaging the player, amount of damage, unknown, damage type);

Got it now.

%obj.client.player.Addhealth(-1);