Blockland Forums > Modification Help

Doing damage to the player that fires the weapon.

Pages: (1/1)

Deadzone:

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?

phflack:

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

Deadzone:

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.

Bauklotz:

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

Deadzone:

Got it now.

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

Pages: (1/1)

Go to full version