Psychonauts Lua API Docs
index
/
User Wikis
/
Wiki Home
/
SpawnScript
loading...
wikOS
powered By
wiltOS Technologies
Psychonauts Lua API
Base Game Lua Classes
1
Root
GEN_dartstart
Engine API
5
AddSpriteHandle
SpawnScript
GamePrint
CreateObject
LSO
Guides
2
Classnames
Creating a new class
SpawnScript
LSO
SpawnScript(
string
ClassName ,
string
Name ,
string
EditVars ,
bool
bHasEntity ,
bool
bDeleteOnLevelUnload )
Description
Spawns a script class.
Arguments
1
string
ClassName
Specifies the class to create
2
string
Name
Specifies what the created entity should be called. If not provided, one is automatically generated.
3
string
EditVars
Specifies editvars to apply to the created entity
4
bool
bHasEntity
Specifies if a corresponding entity is created. It's currently unclear what this entails. Causes an error if used with bDeleteOnLevelUnload=0.
5
bool
bDeleteOnLevelUnload
Controls whether the created entity will be removed when the level unloads. Causes an error if not set when bHasEntity=1.
Returns
1
LSO
Returns the created entity on success.
nil
otherwise.
Login