Copy macro easily

If you have searched the other User Creations subforums and an answer to your question has not been found, please post here!

Moderators: dorpond, trevor, Azhrei, Gamerdude

Post Reply
suntzu777
Cave Troll
Posts: 27
Joined: Sat Oct 31, 2009 8:42 am
Location: UK

Copy macro easily

Post by suntzu777 »

is the an easy way of coping a macro to a token with all its properties from within another macro , i know i can drag it to a token but would prefer a more automatic way , i would like to do this while the game is running

Thanks

Rob

User avatar
Bone White
Great Wyrm
Posts: 1124
Joined: Tue Aug 23, 2011 11:41 am
Location: Cornwall, UK

Re: Copy macro easily

Post by Bone White »

Theoretically, there is Wiki: createMacro() but there is no way (as far as I'm aware) to read the contents of a macro to put into createMacro, meaning you can only create static macros, and not dynamic macros.

I'm not aware of any way of copying across the properties of a token though, unless you know all of them in advance and manually add them one by one.

Lee
Dragon
Posts: 958
Joined: Wed Oct 19, 2011 2:07 am

Re: Copy macro easily

Post by Lee »

Actually, Wiki: getMacroProps() and Wiki: setMacroProps () will do the trick. Or createMacro() in conjunction with Wiki: getMacroCommand() and perhaps, Wiki: setMacroCommand() if one wants to apply the command contents after creation and not during. Token context will need to be switched during the operation.

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

Re: Copy macro easily

Post by wolph42 »

Its certainly possible. I've done it in the passed, when a token was dragged onto the map it was automatically populated with a core macro set. I've donned it however for a better technique (virtual macro panel).

So the question actually boils down to: what is it you want to achieve?

suntzu777
Cave Troll
Posts: 27
Joined: Sat Oct 31, 2009 8:42 am
Location: UK

Re: Copy macro easily

Post by suntzu777 »

managed to do what i wanted with the following code ,

[IF(attack == 1 ), CODE:{[MACRO("Aggravated Wound@Lib:LibEffects"): 1]};{}]
[IF(attack == 1 ), CODE:{[createMacro("Aggravated Wound", '[MACRO("Aggravated Wound@Lib:LibEffects"): 1]', "autoExecute=true;color=red;fontcolor = white;group=Temporary Effects", ";")]};{}]

, this is only part of the full macro but it does work as there are 80 other results and to post the full macro would be overkill in my opinion

thanks for your help

Rob

Post Reply

Return to “Requests for HELLLLP!”