DeleteLocalFloat(object, string)

Deletes oObject's float variable sVarName

void DeleteLocalFloat(
    object oObject,
    string sVarName
);

Parameters

oObject

The object storing the variable.

sVarName

Variable name to delete.


Description

Use this function to delete an object's entry for the float defined by sVarName.



Remarks

As with all deletions, once removed, GetLocalFloat returns 0.0. Cleaning up old variables can help CPU performance if many are stored on one object (especially a module).


Version

1.22

Example

// Placed in an area's OnEnter event, this script determines if the
// entering object is a player, and if so, deletes the float "fTimer"
// Remember, it will delete fTimer, even if fTimer's value doesn't exsist.
void main()
{
    object oPC = GetEnteringObject();
    if(GetIsPC(oPC))
    {
        DeleteLocalFloat(oPC, "fTimer);
    }
}

See Also

categories: Local Variables Functions


 author: Michael Nork, editor: Jasperre
 Send comments on this topic.