Can I impersonate selected token with a macro?

Discuss macro implementations, ask for macro help (to share your creations, see User Creations, probably either Campaign Frameworks or Drop-in Resources).

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

Post Reply
Chimera245
Cave Troll
Posts: 29
Joined: Thu Oct 09, 2014 6:39 pm

Can I impersonate selected token with a macro?

Post by Chimera245 »

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...

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Can I impersonate selected token with a macro?

Post by wolph42 »

Use Wiki: switchToken()

Code: Select all

[h:switchToken(getSelected())]
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.)

Chimera245
Cave Troll
Posts: 29
Joined: Thu Oct 09, 2014 6:39 pm

Re: Can I impersonate selected token with a macro?

Post by Chimera245 »

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.

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Can I impersonate selected token with a macro?

Post by wolph42 »

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.

Post Reply

Return to “Macros”