openclonk/docs/sdk/script/fn/Material.xml

32 lines
999 B
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>Material</title>
<category>Landscape</category>
<subcat>Material</subcat>
<version>5.1 OC</version>
<syntax>
<rtype>int</rtype>
<params>
<param>
<type>string</type>
<name>material_name</name>
<desc>Name of material</desc>
</param>
</params>
</syntax>
<desc>Returns the index of a material from its name. This index is used in most functions dealing with materials.</desc>
<examples>
<example>
<code><funclink>InsertMaterial</funclink>(Material(&quot;Gold&quot;), 200, 100);</code>
<text>Inserts a pixel of gold at position 200/100.</text>
</example>
</examples>
<related><funclink>MaterialName</funclink></related>
</func>
<author>Sven2</author><date>2001-11</date>
</funcs>