Warhorse ScripBind documentation
ContentsIndexHome
PreviousUpNext
CreatePrefab
Syntax
C++
int CreatePrefab(IFunctionHandler* pH, ScriptHandle entityId, const char* libname, const char* prefabname, uint32 nMaxSpawn);
Parameters 
Description 
ScriptHandle entityId 
id of the procedural object that controls the runtime prefab 
const char* libname 
prefab library name 
const char* prefabname 
name of the prefab 
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.