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
Copy macro easily
Moderators: dorpond, trevor, Azhrei, Gamerdude
- Bone White
- Great Wyrm
- Posts: 1124
- Joined: Tue Aug 23, 2011 11:41 am
- Location: Cornwall, UK
Re: Copy macro easily
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.
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.
Re: Copy macro easily
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.
My stuff for the community:
Donate to the Mote Project
The Mote Project's G+ community
Mote on Facebook
Fully Customizable Calendar Drop-in
Donate to the Mote Project
The Mote Project's G+ community
Mote on Facebook
Fully Customizable Calendar Drop-in
Re: Copy macro easily
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?
So the question actually boils down to: what is it you want to achieve?
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
Re: Copy macro easily
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
[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