SetLocalLocation
From NWN Lexicon
Jump to navigationJump to search
SetLocalLocation(object, string, location)
Store a location as a local variable within an object.
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
None.
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);
}
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: |
author: Daniel Beckman, editor: Jasperre, Mistress, additional contributors: Steve U., Graziano Lenzi, Fireboar