1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
<?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>SetName</title>
<category>Objects</category>
<subcat>Status</subcat>
<version>5.1 OC</version>
<syntax>
<rtype>bool</rtype>
<params>
<param>
<type>string</type>
<name>name</name>
<desc>New name. If <code>nil</code>, the object's name is reset to the definition value or the original crew member's name.</desc>
</param>
<param>
<type>bool</type>
<name>set_permanent</name>
<desc>For crew members only: if <code>true</code>, the name is changed permanently in the crew info in the player file. There may be no duplicate names within a player file.</desc>
<optional />
</param>
<param>
<type>bool</type>
<name>make_valid_if_exists</name>
<desc>Determines what should happen if a clonk of the same name already exists in the player's crew. If <code>false</code>, the function call will fail. If <code>true</code>, a unique name is created by appending a number.</desc>
<optional />
</param>
</params>
</syntax>
<desc>Changes name of an object or a definition for the duration of the round.</desc>
<examples>
<example>
<code>protected func InitializePlayer(player)
{
<funclink>GetHiRank</funclink>(player)->SetName("Strunzmuffel");
<funclink>return</funclink> 1;
}</code>
<text>Scenario script: the highest ranking clonks of joining players get different names in this round.</text>
</example>
<example>
<code>protected func Initialize()
{
Wood->SetName("Baumstamm");
}</code>
<text>Scenario script: In this round, wood will be called "Baumstamm".</text>
</example>
</examples>
<related>
<funclink>MakeCrewMember</funclink>
<funclink>GetName</funclink>
</related>
</func>
<author>Sven2</author><date>2003-06</date>
<author>Isilkor</author><date>2009-09</date>
</funcs>
|