modding:function:syscreateweaponfire
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
modding:function:syscreateweaponfire [2017/02/14 02:29] – 0xabcdef | modding:function:syscreateweaponfire [2017/02/14 02:36] (current) – 0xabcdef | ||
---|---|---|---|
Line 5: | Line 5: | ||
See [[http:// | See [[http:// | ||
- | ^ Syntax | (sysCreateWeaponFire weaponID objSource posVector dir speed objTarget [detonateNow] [weaponBonus]) -> obj | | + | ^ 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) | | ^ 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 | | ^ | objSource: the spaceObject who is the controller of the weaponfire, can also be Nil | | ||
^ | posVector: position of the weaponfire | | ^ | posVector: position of the weaponfire | | ||
- | ^ | dir: angle of the direction of the weapon | | + | ^ | 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 | | ^ | speed: velocity of the weaponfire | | ||
^ | objTarget: the target of the weapon, can also be Nil | | ^ | objTarget: the target of the weapon, can also be Nil | | ||
- | ^ | [detonateNow]: if True the failsafe variable in the < | + | ^ | [options]: if True the failsafe variable in the < |
- | ^ | [weaponBonus]: bonus damage as if from enhancement | | + | ^ | [bonus]: Percent |
^ Returns | obj: The shotObject created by the weapon | | ^ Returns | obj: The shotObject created by the weapon | | ||
^ Category | [[create]], [[system]], [[unid]] | | ^ Category | [[create]], [[system]], [[unid]] | | ||
- | ^ Description | Creates the weaponfire effect | + | ^ Description | Creates the shot of a weapon | |
=== Example === | === Example === | ||
- | This is a typical example of firing the source weapon (in an OnFireWeapon event) with many of its base attributes intact, ie. firing in the same angle with the same speed. This is for non missile-weapons. | + | This is a typical example of firing the source weapon (in an <OnFireWeapon> event) with many of its base attributes intact, ie. firing in the same angle with the same speed. This is for non missile-weapons. |
<code lisp> | <code lisp> | ||
Return to [[: | Return to [[: | ||
modding/function/syscreateweaponfire.1487039377.txt.gz · Last modified: 2017/02/14 02:29 by 0xabcdef