User Tools

Site Tools


modding:function:objdamage

Differences

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

Link to this comparison view

Next revision
Previous revision
modding:function:objdamage [2017/02/03 21:32] – created xephyrmodding:function:objdamage [2017/06/26 03:40] (current) 0xabcdef
Line 3: Line 3:
 === objDamage === === objDamage ===
  
-^ Syntax | (objDamage obj weaponType objSource [pos] [options]) | +^ Syntax | (objDamage obj weaponType objSource [pos] [options]) -> result 
-^ Arguments | obj: The space object to damage |+^ Arguments | obj: The SpaceObject to damage |
 ^ | weaponType: unid of weapon to use to damage the object | ^ | weaponType: unid of weapon to use to damage the object |
-^ | objSource: the source of the damgage +^ | objSource: the source of the damage 
-^ | [pos]: (optional) position of the damage on the receiving object| +^ | [pos]: Position vector of the damage on the receiving object| 
-^ | [options]: (optional) options accepted are 'fullResult and 'noHitEffect. +^ | [options]: 
-^ Returns | Result |+^ Returns | result: String code representing the result of the damage |
 ^ Category | [[spaceObject functions]]| ^ Category | [[spaceObject functions]]|
 ^ Description | Use to damage an object directly through a function. Used on Pteravores. | ^ Description | Use to damage an object directly through a function. Used on Pteravores. |
  
-=== Option ===+=== objSource ===
  
-  'fullResult +  * Nil 
-  'noHitEffect +  * SpaceObject 
-   +  * (name flags) 
-=== Result ===+    * name: The string name of the cause 
 +    * flags: 
 +  * (obj [cause] [secondaryObj] [noun] [nounFlags]) 
 +    * obj: The source of the damage 
 +    * cause: A destroyReason 
 +    * secondaryObj: Unused 
 +    * noun: 
 +    * nounFlags:
  
-  'noDamage +=== options ===
-  'absorbedByShields +
-  'armorHit +
-  'structuralHit +
-  'destroyed+
  
 +  * 'fullResult
 +  * 'noHitEffect
 +
 +=== result ===
 +
 +  * 'noDamage
 +  * 'absorbedByShields
 +  * 'armorHit
 +  * 'structuralHit (same as armorHit, but for stations)
 +  * 'destroyed
 +  * 'passthrough
 +  * 'passthroughDestroyed (obj was destroyed AND the shot passed through)
 +  * 'destroyedAbandoned (station was destroyed)
 +  * "noDamageNoPassthrough",
  
 === Example === === Example ===
Line 37: Line 54:
 Return to [[modding:functions:]] list Return to [[modding:functions:]] list
  
 +=== References ===
 +http://forums.kronosaur.com/viewtopic.php?p=40207#p40207
modding/function/objdamage.1486157578.txt.gz · Last modified: 2017/02/03 21:32 by xephyr