User Tools

Site Tools


modding:function:syscreateweaponfire

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
modding:function:syscreateweaponfire [2017/02/14 02:29] 0xabcdefmodding:function:syscreateweaponfire [2017/02/14 02:36] (current) 0xabcdef
Line 5: Line 5:
 See [[http://xelerus.de/index.php?s=functions&function=251|sysCreateWeaponFire at Xelerus]] See [[http://xelerus.de/index.php?s=functions&function=251|sysCreateWeaponFire at Xelerus]]
  
-^ 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 <Weapon> tag is ignored | +^ | [options]: if True the failsafe variable in the <Weapon> tag is ignored | 
-^ | [weaponBonus]: bonus damage as if from enhancement |+^ | [bonus]: Percent bonus damage to add as if from an hpBonus enhancement|
 ^ 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 of a weapon selected from the UNID |+^ 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 <OnFireWeaponevent) 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>(sysCreateWeaponFire (itmGetUNID gItem) gSource aFirePos aFireAngle (typGetDataField (itmGetUNID gItem) 'speed) aTargetObj)</code> <code lisp>(sysCreateWeaponFire (itmGetUNID gItem) gSource aFirePos aFireAngle (typGetDataField (itmGetUNID gItem) 'speed) aTargetObj)</code>
 Return to [[:Functions]] list Return to [[:Functions]] list
  
modding/function/syscreateweaponfire.1487039377.txt.gz · Last modified: 2017/02/14 02:29 by 0xabcdef