DeleteLocalLocation(object, string)
Deletes oObject's location variable sVarName.
void DeleteLocalLocation( object oObject, string sVarName );
Parameters
oObject
The object storing the variable.
sVarName
Variable name to delete.
Description
This function deletes an object's entry for the location defined by sVarName.
Note: A location is made up of a vector position (X, Y, Z) area (object) and facing (0-360 degrees). All can be got by GetXFromLocation().
Remarks
As with all deletions, once removed, GetLocalLocation returns, for this, OBJECT_INVALID when GetAreaFromLocation() is called on the return value. Cleaning up old variables can help CPU performance if many are stored on one object (especially a module).
Version
1.22
Example
// We delete the variable "RESPAWN_LOCATION" if the PC has entered this trigger void main() { // Declare the entering object object oPC = GetEnteringObject(); // Delete the local location DeleteLocalLocation(oPC, "RESPAWN_LOCATION"); }
See Also
categories: | Local Variables Functions |
author: Michael Nork, editor: Jasperre
Send comments on this topic.