I´d like to make on click based moving. But in that case I need current cursor coordinates. There are two numbers(XY), in right bottom corner of MT called Map Coordinates. Thats exactly what I need. Is it posible to get them in Macro? I didnt find any expresion in wiki function list. And any topic about it.
Thanks a lot - Petr.
Get map (cursor) coordinates?
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.
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.
Re: Get map (cursor) coordinates?
There is no event in the macro language to get the cursor location by clicking the map. The only way it can be done is if you click a token and get the token's location.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: Get map (cursor) coordinates?
Oh, well. Thanks for instant replay.
Re: Get map (cursor) coordinates?
What is it you want to achieve. Cause I have recently developed a story of click based method that sends the coords back. But it had its drawbacks
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: Get map (cursor) coordinates?
Move current token to actual click. It should be used like substitute of moving while player movement is locked (moving pad with arrows is a little bit clumsy for my purpose). Heroes can´t move more than 5 cells/round. So I´ll probably try to make array of tokens in conic vision of token, ended of 5 (max 35 tokens). These tokens will partly transparent, and will look like grind. After chosing one of these toknes will hero change location, and "grind tokens" will be destroyed.
Re: Get map (cursor) coordinates?
ok there are two things that you can do:
1. you can create a layer of transparent tokens on the grid. When you select such token then that coord can be grabbed and the player token is moved there. In this case I would move the players tokens to the object layer so they cant intereact, they can only click on the transparent token grid. Check out my bag of tricks vid about swift map creation (last vid, link in sig) to get an idea.
2. you can use onTokenMove event. with that even you can reset an illegal move and you can check the distance travelled. In addition you can add macros to activate when a certain (legal) move has been committed. It would still require dragging and dropping tokens, but i gets the job done.
1. you can create a layer of transparent tokens on the grid. When you select such token then that coord can be grabbed and the player token is moved there. In this case I would move the players tokens to the object layer so they cant intereact, they can only click on the transparent token grid. Check out my bag of tricks vid about swift map creation (last vid, link in sig) to get an idea.
2. you can use onTokenMove event. with that even you can reset an illegal move and you can check the distance travelled. In addition you can add macros to activate when a certain (legal) move has been committed. It would still require dragging and dropping tokens, but i gets the job done.
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: Get map (cursor) coordinates?
Okay, first option sound best. But what about mass of transparetn tokens? In map, for example, 300x300 cells it is about 90 000 tokens. Is MT still usable in this case?
Re: Get map (cursor) coordinates?
thats an interesting question. I'm inclined to say: yes. I've created area of much much larger scale and then used them for macro and it was insanely swift. This is different true, BUTNertht wrote:Okay, first option sound best. But what about mass of transparetn tokens? In map, for example, 300x300 cells it is about 90 000 tokens. Is MT still usable in this case?
1. its only one token of <10 bytes large so memory wise its nothing. And maptool only saves the one to memory whether its one or one million
2. you also do not cycle through them but you use the onSelection event which is triggered by selecting one token.
be careful though that the select and impersonation panel are NOT open when you remove the tokens cause it refreshes those panels after EACH deletion which might take a couple of hours!!
in the end though the proof is in the pudding. But you can use the bag of tricks and create such a field on a clean map to see the impact. Should take you a few minutes to test. Note that the tokens I used for the field editor are semi transparent, you might want to use full transparent tokens.
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: Get map (cursor) coordinates?
Wow, thanks a lot for your answers. These informations are really significant to me. This is pretty cool.
Re: Get map (cursor) coordinates?
np. if you have any trouble, let us know.
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