SetLocalLocation(object, string, location)

Store a location as a local variable within an object.

void SetLocalLocation(
    object oObject,
    string sVarName,
    location lValue
);

Parameters

oObject

Target object to store local variable in.

sVarName

Unique variable name.

lValue

Variable being stored in local object.


Description

Stores lValue as a local location within oObject using the variable name sVarName. The parameter sVarName is a unique string identifying a single local variable. Using the same value for sVarName in subsequent calls will overwrite the original value.



Remarks

Set the function Location for more information about locations.


Known Bugs

Setting a value to a newly created object has some particular nuances. See SetLocalString(object, string, string) for more information.


Version

1.28

Example

// simple example that demonstrates syntax for SetLocalLocation
void main()
{
     object oThis = OBJECT_SELF;
     string sKey = "foo";
     object oArea = GetArea(OBJECT_SELF);
     vector vPosition = Vector(0.0, 0.0, 0.0);
     location lValue = Location(oArea, vPosition, 0.0);
     SetLocalLocation(oThis, sKey, lValue);
}

See Also

functions: GetLocalLocation
categories: Local Variables Functions


 author: Daniel Beckman, editor: Jasperre, Mistress, additional contributors: Steve U., Graziano Lenzi, Fireboar