forked from Mirrors/openclonk
44 lines
1.5 KiB
XML
44 lines
1.5 KiB
XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
<!DOCTYPE funcs
|
|
SYSTEM '../../../clonk.dtd'>
|
|
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
|
|
<funcs>
|
|
<func>
|
|
<title>DoDamage</title>
|
|
<category>Objects</category>
|
|
<subcat>Status</subcat>
|
|
<version>5.1 OC</version>
|
|
<syntax>
|
|
<rtype>void</rtype>
|
|
<params>
|
|
<param>
|
|
<type>int</type>
|
|
<name>change</name>
|
|
<desc>Change of damage value (positive or negative).</desc>
|
|
</param>
|
|
<param>
|
|
<type>int</type>
|
|
<name>damage_type</name>
|
|
<desc>Damage cause specification which is to be passed to Fx*Damage callbacks of effects (see <emlink href="script/Effects.html">effect documentation</emlink>). Default is FX_Call_DmgScript.</desc>
|
|
<optional />
|
|
</param>
|
|
<param>
|
|
<type>int</type>
|
|
<name>caused_by</name>
|
|
<desc>Number of the player who has caused the damage.</desc>
|
|
<optional />
|
|
</param>
|
|
</params>
|
|
</syntax>
|
|
<desc>Adjusts the damage value of an object. If a change is made, the callback 'Damage' is made in the target object.</desc>
|
|
<examples>
|
|
<example>
|
|
<code><funclink>FindObject</funclink>(<funclink>Find_Func</funclink>("IsTree"))->DoDamage(500);</code>
|
|
<text>Fells a tree if it's not yet down.</text>
|
|
</example>
|
|
</examples>
|
|
<related><funclink>GetDamage</funclink></related>
|
|
</func>
|
|
<author>Sven2</author><date>2001-11</date>
|
|
</funcs>
|