SetName

Category: Objects / Status
Since engine version: 1.0 OC

Description

Changes name of an object or a definition for the duration of the round.

Syntax

bool SetName(string name, bool set_permanent, bool make_valid_if_exists);

Parameters

name:
New name. If nil, the object's name is reset to the definition value or the original crew member's name.
set_permanent:
[opt] For crew members only: if true, the name is changed permanently in the crew info in the player file. There may be no duplicate names within a player file.
make_valid_if_exists:
[opt] Determines what should happen if a clonk of the same name already exists in the player's crew. If false, the function call will fail. If true, a unique name is created by appending a number.

Examples

protected func InitializePlayer(player)
{
	GetHiRank(player)->SetName("Strunzmuffel");
	return 1;
}
Scenario script: the highest ranking clonks of joining players get different names in this round.
protected func Initialize()
{
	Wood->SetName("Baumstamm");
}
Scenario script: In this round, wood will be called "Baumstamm".
See also: GetName, MakeCrewMember
Sven2, 2003-06
Isilkor, 2009-09