Change who receives the Output from inside a macro?

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
Merudo
Giant
Posts: 228
Joined: Wed Jun 05, 2019 7:06 am

Change who receives the Output from inside a macro?

Post by Merudo »

The "macroLink" command works like this:

Code: Select all

macroLink(text, macroName, output)
where output contains who the output of the macro should go to.

In macroName, is there a way I can change who receives the output?

I know I can change the current token through the switchToken() command. Is there something like switchOutput()?

My other approach is to use broadcast() but it doesn't display the rolls the way I want.

EDIT: I think I have found a way!

I can just put some of the display code in another macro. Then I can create a macroLinkText to the new macro in the original macro, with a different output argument. Then I use execLink() on the macroLinkText so that the text is displayed according to the new output argument.

Post Reply

Return to “MapTool”