User Tools

Site Tools


dictionary:unitinformation:thisunit

Table of Contents

This Unit

in a Unit ON or OFF script this will be set to the name of the unit. If you need to reference the parent unit in it's scripts this will save you having to edit scripts all over the place if you want to change unit names in the future.

If an error occurs in a Unit’s on or off script then the value will also be set in the Script Error Alert script so that you can alert or log more information about a potential scripting error.

Usage:

thisUnit
returns text, the name of the unit who's ON or OFF script is being run.

Examples:

--in the ON script of a unit
turnoff (thisUnit) in 2 * minutes

See Also:

dictionary/unitinformation/thisunit.txt · Last modified: 2023/02/13 14:52 by 127.0.0.1