I thought this would be simple, to create a macro to place a smaller token on another token. Since both tokens have their rotation point set at the center, I foolish thought it would be a matter of getting the bigger tokens position and then setting the smaller token to that. But it seems maptool uses upper left as its position or something like that.
Is there any easy way to accomplish this? This is a gridless map, with tokens that aren't the same size, some are squares some aren't, and no locking to the grid. Any suggestions would be appreciated!
Place one token on top of another
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
- Bone White
- Great Wyrm
- Posts: 1124
- Joined: Tue Aug 23, 2011 11:41 am
- Location: Cornwall, UK
Re: Place one token on top of another
You'd have to offset the token's x and y pos by half the token size. How you'd do that without using the grid, I wouldn't know
Re: Place one token on top of another
IRC you need gettokenwidth and gettokenheight, dividend by 2 and add it to thè x/y position of the smaller token.
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: Place one token on top of another
Sadly, with a non-square token for the big token and the ability for it to be rotated into any angle, this does not appear to work.
I'm also in .87, so don't have getTokenWidth/Height but I know the width/height of the tokens involved, so can just hard code the values in. But, its not resulting in the smaller token ending up in the middle of the bigger token. It ends up in the same place everytime, no matter if the bigger token (which is rectangle) is pointing straight up or to the left.
I'm also in .87, so don't have getTokenWidth/Height but I know the width/height of the tokens involved, so can just hard code the values in. But, its not resulting in the smaller token ending up in the middle of the bigger token. It ends up in the same place everytime, no matter if the bigger token (which is rectangle) is pointing straight up or to the left.
Re: Place one token on top of another
Could you give some screenshots, to get the idea?
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: Place one token on top of another
Sure...
so the direction of the red arrow isn't important but what I need is for it to end up in the center of the car. As you can see, it ends up in different spots on the car, given the cars rotation.
They are both Top down tokens, with free rotation. The arrow token is 75x75 and the car is 150x75.
so the direction of the red arrow isn't important but what I need is for it to end up in the center of the car. As you can see, it ends up in different spots on the car, given the cars rotation.
They are both Top down tokens, with free rotation. The arrow token is 75x75 and the car is 150x75.
Re: Place one token on top of another
Found a different way to skin this cat, working for me now...thanks though, sometimes you just need someone else to point you in the right direction.