Usage
Syntax: function onWeaponFired() { }
Explanation
onWeaponFired is triggered clientside when the player uses/fires the weapon NPC.
It's only triggered in weapon scripts and on the currently selected weapon.
Example
//#CLIENTSIDE function onWeaponFired() { shoot(player.x, player.y, player.z, getangle(vecx(player.dir), vecy(player.dir)), 0, 0, "arrow", "barrow0.png"); }
... shoots an arrow when the player uses the weapon.
Categories
CategoryFunctionEvent
There are no comments on this page. [Add comment]