SetLocalLocation

From NWN Lexicon



Contents

[edit] SetLocalLocation(object, string, location)

Store a location as a local variable within an object.

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

[edit] Parameters

oObject

Target object to store local variable in.

sVarName

Unique variable name.

lValue

Variable being stored in local object.


[edit] 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.



[edit] Remarks

Set the function Location for more information about locations.


[edit] Known Bugs

None.


[edit] Version

1.28

[edit] 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);
}

[edit] See Also

functions: 

GetLocalLocation



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

Personal tools
Categories