Warhorse ScripBind documentation
ContentsIndexHome
PreviousUpNext
CreatePrefab
Syntax
C++
int CreatePrefab(IFunctionHandler* pH, ScriptHandle entityId, const char* prefabTemplateId, uint32 nMaxSpawn);
Parameters 
Description 
ScriptHandle entityId 
id of the procedural object that controls the runtime prefab 
const char* prefabTemplateId 
GUID of the prefab template 
mMaxSpawn 
limit of the runtime prefabs of this type to be spawned (zero means no limit)
 

Syntax: Game.CreatePrefab(self.id,props.filePrefabLibrary,props.ObjectVariation.sPrefabVariation,props.nMaxSpawn); 

Creates the runtime prefab in the same way as SpawnPrefab, but doesn't spawn the content of the prefab. Only creates the prefab and links to given entity id.

Copyright (c) 2012. All rights reserved.