Well, more specifically, an event macro (onTokenMove).
I'm wondering if there's a way to, in simplest terms, have currentToken() print out the selected token's name instead of its ID. getImpersonatedName() is the closest thing I could find, but it doesn't work with onTokenMove (sitting in a lib) even if applyToTokens is true. I don't think the token is ever impersonated by this particular macro. Maybe there's a way using getTokenNames(), returning only the selected token? I'm not sure!
Return the Selected Token's Name (not ID) in a Macro?
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
Re: Return the Selected Token's Name (not ID) in a Macro?
depends on your context: token.name would return you that, however maybe you need to do some switchToken(id) first.
Re: Return the Selected Token's Name (not ID) in a Macro?
Yep, I'm an idiot. Totally forgot about that one, thanks!
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: Return the Selected Token's Name (not ID) in a Macro?
Not completely sure what your use case is, but there is this, too: Wiki: getSelectedNames()Bladehawk wrote:Maybe there's a way using getTokenNames(), returning only the selected token? I'm not sure!
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."