Files
dsrc/sku.0/sys.server/compiled/game/script/poi/remote_theater_spawner.script
T

59 lines
1.8 KiB
Plaintext

/**
* Copyright (C)2004 Sony Online Entertainment Inc.
* All Rights Reserved
*
* Title: poi.remote_theater_spawner.script
* Description: This gets attached to a remote theater spawner and handles the message telling what theater to spawn.
* @author $Author: Steve Jakab $
* @version $Revision: #1 $
*/
/***** INCLUDES ********************************************************/
/***** CONSTANTS *******************************************************/
/***** TRIGGERS ********************************************************/
messageHandler handleCreateRemoteTheater()
{
string datatable = params.getString("datatable");
if ( datatable == null )
{
CustomerServiceLog("theater", "WARNING: handleCreateRemoteTheater could not get "+
"datatable from params on remote theater spawner " + self);
return SCRIPT_CONTINUE;
}
obj_id caller = params.getObjId("caller");
string name = params.getString("name");
int locationType = params.getInt("locationType");
obj_id theater = null;
// see if we were given a position
if ( params.containsKey("x") )
{
float x = params.getFloat("x");
float z = params.getFloat("z");
string script = params.getString("script");
debugServerConsoleMsg(self, "handleCreateRemoteTheater creating theater at " + x + ", " + z + " with script " + script);
theater = createTheater(datatable, new location(x, 0, z), script, caller, name, locationType);
}
else
{
// the position of the theater is in the datatable
theater = createTheater(datatable, caller, name, locationType);
}
if ( !isIdValid(theater) )
{
CustomerServiceLog("theater", "WARNING: handleCreateRemoteTheater could not create "+
"theater from datatable " + datatable + " on remote theater spawner " + self);
}
destroyObject(self);
return SCRIPT_CONTINUE;
}