GetDefinitionGroupPath

Kategorie: Objekte
Ab Engineversion: 8.0 OC

Beschreibung

Returns the editor group path of the calling definition. This is the path at which the definition is shown in the creator window and can be used to gorup definitions in large dropdown enumerations.

Syntax

string GetDefinitionGroupPath();

Beispiel

var index = 0, weapon_def, weapon_list = [];
while (weapon_def = GetDefinition(index))
{
	if (WildcardMatch(weapon_def->GetDefinitionGroupPath(), "*/Weapons")
		weapon_list[GetLength(weapon_list)] = weapon_def;
	index++;
}
var spawn_weapon = weapon_list[Random(GetLength(weapon_list))];
CreateObject(spawn_weapon,AbsX(Random(LandscapeWidth())),0);
Searches through all loaded definitions and all that are placed directly in a group folder named "Weapons" are put into an array. After that, a random item of these defintions is selected to spawn at a random position in the landscape.
Siehe auch: GetDefinition
Sven2, 2016-09