I want to be able to impersonate a selected token with a button press.
I have tried "/im [token.name]", and "/im [string(token.name)]".
"Apply to selected tokens" is checked.
Each time I have tried the macro, I just get "speaking as (my username)", no matter what token I have selected...
Can I impersonate selected token with a macro?
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
-
- Cave Troll
- Posts: 29
- Joined: Thu Oct 09, 2014 6:39 pm
Re: Can I impersonate selected token with a macro?
Use Wiki: switchToken()
note that this impersonates the token for the remainder of the macro.
edit: you didn't tell us what it is what you wish to achieve. Can you elaborate (I hope that Im right in that your achievement is not: open MT, select token, click macro to impersonate selected token, check that token is indeed impersonated, close MT.)
Code: Select all
[h:switchToken(getSelected())]
edit: you didn't tell us what it is what you wish to achieve. Can you elaborate (I hope that Im right in that your achievement is not: open MT, select token, click macro to impersonate selected token, check that token is indeed impersonated, close MT.)
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
-
- Cave Troll
- Posts: 29
- Joined: Thu Oct 09, 2014 6:39 pm
Re: Can I impersonate selected token with a macro?
I want to be able to basically assign a keystroke to impersonation.
I hit, for example, F2, and I am now impersonating whoever was selected. My screen will say "Speaking as Jim Bob the Fighter" with Jim Bob the Fighter's picture next to everything I say. It will remain this way until I click on Mary Sue the Wizard, and hit F2 again, at which point, I will be impersonating Mary Sue the Wizard instead. Then I click my "Stop Impersonating Anyone" macro, which reads "/im", and is assigned ALT+F2 instead, and I am speaking as the DM again to inform Jim Bob and Mary Sue that they hear evil laughter, then I click Steve McEvil the Necromancer's token, hit F2, and as Steve McEvil, I gloat to the foolish heroes about the master plan.
That's what I'm hoping to achieve.
I hit, for example, F2, and I am now impersonating whoever was selected. My screen will say "Speaking as Jim Bob the Fighter" with Jim Bob the Fighter's picture next to everything I say. It will remain this way until I click on Mary Sue the Wizard, and hit F2 again, at which point, I will be impersonating Mary Sue the Wizard instead. Then I click my "Stop Impersonating Anyone" macro, which reads "/im", and is assigned ALT+F2 instead, and I am speaking as the DM again to inform Jim Bob and Mary Sue that they hear evil laughter, then I click Steve McEvil the Necromancer's token, hit F2, and as Steve McEvil, I gloat to the foolish heroes about the master plan.
That's what I'm hoping to achieve.
Re: Can I impersonate selected token with a macro?
IRC there is a whisper drop-in (which should also be in the bag of tricks) with which you can do such a thing. Ideally you would simply have a frame sends messages 'as selected token', it might be there as well, so check that. Which is possible. Actual impersonation is NOT possible through a macro (beyond the duration of the macro). The best possible thing is a frame with a text box and s 'send' button, which simply sends the text to chat impersonating the currently selected token. It *might* be part of the BoT, but Im not sure, else you need to build it yourself.
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS