Discuss this page on this pages [[sysCreateWeaponFire Talk Page|TalkPage]] === sysCreateWeaponFire === See [[http://xelerus.de/index.php?s=functions&function=251|sysCreateWeaponFire at Xelerus]] ^ Syntax | (sysCreateWeaponFire weaponID objSource posVector dir speed objTarget [options] [bonus]) -> obj | ^ Arguments | weaponID: the UNID of the called weapon effect. Can also be an itemStruct (for weapon scaling) | ^ | objSource: the spaceObject who is the controller of the weaponfire, can also be Nil | ^ | posVector: position of the weaponfire | ^ | dir: angle of the direction of the weapon. If this is Nil and objTarget is defined, then automatically calculates the angle needed to hit objTarget. Otherwise, defaults to 0. | ^ | speed: velocity of the weaponfire | ^ | objTarget: the target of the weapon, can also be Nil | ^ | [options]: if True the failsafe variable in the tag is ignored | ^ | [bonus]: Percent bonus damage to add as if from an hpBonus enhancement. | ^ Returns | obj: The shotObject created by the weapon | ^ Category | [[create]], [[system]], [[unid]] | ^ Description | Creates the shot of a weapon | === Example === This is a typical example of firing the source weapon (in an event) with many of its base attributes intact, ie. firing in the same angle with the same speed. This is for non missile-weapons. (sysCreateWeaponFire (itmGetUNID gItem) gSource aFirePos aFireAngle (typGetDataField (itmGetUNID gItem) 'speed) aTargetObj) Return to [[:Functions]] list