Therefore, all in-game objects have the following functions in common:
GetGType() returns the galaxy-type of the object
GetGSubType() returns the galaxy-subtype of the object
GetType() returns the sector-type of the object
GetSubType() returns the sector-subtype of the object
void AddTo(GALOBJ env)
Adds object to the given environment.
GALOBJ Create(int x, int y, int z, int ssubtype, int raceid)
creates a object with given parameters an returns the created object itself. See Constant Definitions used in Xē and Race IDs.
void Deactivate()
Deactivates and frees an object. Works only for sector objects.
GALOBJ Destruct()
Clears up data of object (stopping tasks, freeing arrays etc.). Returns the destructed object. The function should be called before the object is removed with delete.
GALOBJ GetEnvironment(), void SetEnvironment(GALOBJ)
The environment is an object that surrounds/contains another object. If an object is in space, itīs environment is the sector (SGTYPE_SECTOR or SSTYPE_SECTOR). With this function the environment can be retrieved or set.
GALOBJ GetOwner()
The owner of the object. This is either a raceobject or the playerobject. See also ga_Races[] in Global Variables .
int GetSize(), int GetGSize()
If an object is in actual sector GetSize() returns itīs size. Otherwise GetGSize() is called. GetGSize() returns a size-class used for galaxy objects.
string GetName()
Returns the name of the object.
array GetPos()
Returns an array of the object-position. Format: [x, y, z, rotation-alpha, rotation-beta, rotation-gamma, gdirx, gdiry, gdirz, formation_x, formation_y, formation_z]
void SetPos()
Sets the x,y,z position of the object.
void SetTargetted()
Sets the object as known by player.
void KilledBy(int reason, SECOBID skiller, SECOBID sother)
Object is killed by another object and therefore destroys itself.
"skiller" - the SECOBID of the killer (obtained via "object.GetObjectID()")
"reason" - reason of death (see Reason for death ).
"sother" - this parameter is not used
void SelfDestruct(reason)
Destroys the object (also object is removed with delete). See Reason for death for reason.
SECOBID GetObjectID()
If an object is in the current sector (itīs a sector-object then), the story-engine sets its ObjectID.
This can be obtained with GetObjectID(). If the function returns 0 the object is not in the active sector.
This sector object ID is needed for all SA system calls into the physics (sector) engine.
int GetClass()
Returns the ID of the object-type. The ID corresponds to the objects documented in this documentation (OBJ_*).
BOOL IsClass(para)
Check if the object is of the type given in "para".
For further information see Systemcalls:
SE_ Story Engine System Calls
SA_ Sector Engine System Calls