OBJECT SELF

  is an object-valued NWScript constant indicating the object that is running the current script. This is the object to which actions are assigned (unless an  indicates otherwise) and is the default object for many NWScript commands.

While  is called a constant and can usually be treated as such, it is technically a macro. This has a few consequences of note.

First,  does not have a specific value, unlike   for example. Instead,  gets replaced by the value of the current object (is bound to an object) as soon as the game encounters the "constant" while executing a script. The timing of this is of particular note when used in conjunction with, as any parameters to the assigned command are not "encountered" until after control is transferred. That is, if  is used in the parameters to the assigned command, it will be bound to the object to which the command was assigned. To have the assigned command refer to the assigner,  needs to be assigned to a variable, then that variable can be used as a parameter.

Second, each use of  consumes a small amount of processing power as its binding must be determined. Scripts that make heavy use of  can be made marginally more efficient by assigning   to a variable, then using that variable in place of the constant.