hi i'm trying to create some macros to set a spwn point of sort for when my players connect to the server
the idea is to save a mapname zoomlevel and token name (that i will call "center token" from now on) into a library and then using onCampaignLoad
to enforce that as a starting position
the problem being that i need the setCurrentMap to take effect before i set zoom e center the screen around the "center token"
i've tried usig execlink with defer and a wait cycle but to no avail, in fact if i have setcurrentmap the macro in execlink is not executed at all
removing the setcurrentmap will result in the correct execution of the execlink.
is there any way to specify in wich order different oncampaignload macros should be executed or something similar?
thank you in advance and i hope this isn't redundant i've tried the search function to no avail.
setCurrentMap and execlink
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: setCurrentMap and execlink
Your best bet is to chain the commands. So, your setCurrentMap defer will call the setZoom defer Rather than having the defers created in the original macro.
There are certain things that just can't be done well because of timing and when MT needs to redraw something (token,init panel,map) then you can run in to those kind of problems because those things are saved for last. For example, I can change maps, get a property from a token and change the map back and all you'll see is a flicker because only the last map is redrawn.
MT is also particular about onCampaignLoad and changing things on tokens. Here's what I would do.
Can you share your code so I can get a better idea of the details of what you're trying to do. For example, do you move their token to a spawn location or just have a saved location for their token and go to that map and zoom in?
There are certain things that just can't be done well because of timing and when MT needs to redraw something (token,init panel,map) then you can run in to those kind of problems because those things are saved for last. For example, I can change maps, get a property from a token and change the map back and all you'll see is a flicker because only the last map is redrawn.
MT is also particular about onCampaignLoad and changing things on tokens. Here's what I would do.
Can you share your code so I can get a better idea of the details of what you're trying to do. For example, do you move their token to a spawn location or just have a saved location for their token and go to that map and zoom in?
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
- JamzTheMan
- Great Wyrm
- Posts: 1872
- Joined: Mon May 10, 2010 12:59 pm
- Location: Chicagoland
- Contact:
Re: setCurrentMap and execlink
I can't believe I'm beating Wolph42 but....
His BoT has all that built in. It'll save you time.
He has a "Start map" that forces clients to this map/coords on start. And if you put a token called CentreOnMe (IIRC) and enable the option, any map will center to that token. (There's a function to 'move' pc tokens from map to map and it moves them to this token).
Anyhoo, ya, get the bot. Love the bot. use the bot. Save your time for coding other non-bot functions!
His BoT has all that built in. It'll save you time.
He has a "Start map" that forces clients to this map/coords on start. And if you put a token called CentreOnMe (IIRC) and enable the option, any map will center to that token. (There's a function to 'move' pc tokens from map to map and it moves them to this token).
Anyhoo, ya, get the bot. Love the bot. use the bot. Save your time for coding other non-bot functions!
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
Re: setCurrentMap and execlink
(link in sig)
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
-
- Kobold
- Posts: 4
- Joined: Fri Sep 27, 2013 6:11 pm
Re: setCurrentMap and execlink
i'll try the BOT, and a bit of self restraint the last time i used it i got carried away with the cool things and some players with coal powered pc had great performance issues
thats why i started building a minimalistic framework much much smaller than the BOT.
thats why i started building a minimalistic framework much much smaller than the BOT.
Re: setCurrentMap and execlink
last few times i've rebuild the bot so that it can be used in a minimalistic way, by turning features on and of. But yes, use it in its full glory and you will notice it.
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
- JamzTheMan
- Great Wyrm
- Posts: 1872
- Joined: Mon May 10, 2010 12:59 pm
- Location: Chicagoland
- Contact:
Re: setCurrentMap and execlink
Yea... self-restraint is going to be needed, unless you want to buy everyone Core-I7's with 32gb ram.
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
Re: setCurrentMap and execlink
That's only $1,300, you know. (I just got a quote for work on exactly that from Dell.)JamzTheMan wrote:Yea... self-restraint is going to be needed, unless you want to buy everyone Core-I7's with 32gb ram.