Discuss this page on this pages [[objDamage Talk Page|TalkPage]] === objDamage === ^ Syntax | (objDamage obj weaponType objSource [pos] [options]) -> result | ^ Arguments | obj: The SpaceObject to damage | ^ | weaponType: unid of weapon to use to damage the object | ^ | objSource: the source of the damage | ^ | [pos]: Position vector of the damage on the receiving object| ^ | [options]: ? | ^ Returns | result: String code representing the result of the damage | ^ Category | [[spaceObject functions]]| ^ Description | Use to damage an object directly through a function. Used on Pteravores. | === objSource === * Nil * SpaceObject * (name flags) * 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: === options === * '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 === (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 [[modding:function:objGetOverlayPos]] to retrieve a value for the [pos] field. Return to [[modding:function:spaceObject_functions|Space Object functions]] list Return to [[modding:functions:]] list === References === http://forums.kronosaur.com/viewtopic.php?p=40207#p40207