RPTools

Personal tools
From MapToolDoc

findToken

findToken() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.3b48

Finds a token on the current map by the token name or GM name and returns its id. If the token is not found then an empty string "" is returned.

Usage

  1. findToken(name)

Example

  1. [h: id = findToken("Hero")]
  2. [if (id == "", "Token not found!", "Token found")]