modding:function:objdamage
This is an old revision of the document!
Discuss this page on this pages TalkPage
objDamage
Syntax | (objDamage obj weaponType objSource [pos] [options]) |
---|---|
Arguments | obj: The space object to damage |
weaponType: unid of weapon to use to damage the object | |
objSource: the source of the damgage | |
[pos]: (optional) position of the damage on the receiving object | |
[options]: (optional) options accepted are 'fullResult and 'noHitEffect. | |
Returns | Result |
Category | spaceObject functions |
Description | Use to damage an object directly through a function. Used on Pteravores. |
Option
'fullResult 'noHitEffect
Result
'noDamage 'absorbedByShields 'armorHit 'structuralHit 'destroyed
Example
(objDamage gPlayership &itLaserCannon; overlayObj)
Causes the overlayObj to damage the playership with the same damage as a laser cannon, at the center of the ship with a hit effect. In this case, you could use objGetOverlayPos to retrieve a value for the [pos] field.
Return to Space Object functions list
Return to functions list
modding/function/objdamage.1486157578.txt.gz · Last modified: 2017/02/03 21:32 by xephyr