GetLocalObject(object, string)

Get the data describing an object stored on an object.

object GetLocalObject(
    object oObject,
    string sVarName
);

Parameters

oObject

The object that stores the object.

sVarName

The variable name of the data.


Description

Returns data contained inside the variable sVarName stored on the object oObject. oObject can be any object in the game world. The string describing the variable can also be any string in theory but it is suggested that you avoid using the NW_* tags as they tend to be used within the game already. This function must be used in conjunction with its counterpart function SetLocalObject, as this is the main way to adjust the values held in the variable sVarName. On error the function will return OBJECT_INVALID.



Version

1.22

Example

// This will send the PC to the object stored in "Data"
void main()
{
    object a = GetLocalObject(OBJECT_SELF,"Data");
    AssignCommand(GetFirstPC(),ActionMoveToObject(a,TRUE,1.0));
}

See Also

functions: SetLocalObject
categories: Get Data Functions | Get Data from Creature Functions | Get Data from Object Functions | Local Variables Functions


 author: GoLeM, editor: Kristian Markon
 Send comments on this topic.