Is there a way to check for token id existence that doesn't blow an error?
Is it just getting all the tokens on a map and check with a json.contains?
Check for Token Existence
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
Re: Check for Token Existence
I use Wiki: findToken(). Works both for names and ids and returns "" if not found on current map. I also use Wiki: getImage() to find a token in the campaign, but that only works with a name.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: Check for Token Existence
Thanks. The getImage one is interesting along with the image: type tokens. I've been using state images for those sorts of things.
Re: Check for Token Existence
getImage works for any token, not just image:tokens, although I think it was originally designed for only image tokens and later changed.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools