RPTools.net

Discussion and Support

Skip to content

It is currently Sun Dec 17, 2017 10:57 am 




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. :)



Reply to topic  [ 8 posts ] 

Previous topic | Next topic 

  Print view

Author Message
 Offline
Kobold
 
Joined: Fri Sep 27, 2013 5:11 pm
Posts: 4
 Post subject: setCurrentMap and execlink
PostPosted: Wed Sep 27, 2017 9:28 am 
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.


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7969
Location: Bay Area
 Post subject: Re: setCurrentMap and execlink
PostPosted: Wed Sep 27, 2017 10:59 am 
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?

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon May 10, 2010 11:59 am
Posts: 1722
Location: Chicagoland
 Post subject: Re: setCurrentMap and execlink
PostPosted: Wed Sep 27, 2017 7:40 pm 
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! :mrgreen:

_________________
-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


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9427
Location: Netherlands
 Post subject: Re: setCurrentMap and execlink
PostPosted: Thu Sep 28, 2017 2:19 am 
:) (link in sig)

_________________
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC

My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent and
DPI.
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


Top
 Profile  
 
 Offline
Kobold
 
Joined: Fri Sep 27, 2013 5:11 pm
Posts: 4
 Post subject: Re: setCurrentMap and execlink
PostPosted: Thu Sep 28, 2017 7:04 am 
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.


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9427
Location: Netherlands
 Post subject: Re: setCurrentMap and execlink
PostPosted: Thu Sep 28, 2017 9:11 am 
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

My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent and
DPI.
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


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon May 10, 2010 11:59 am
Posts: 1722
Location: Chicagoland
 Post subject: Re: setCurrentMap and execlink
PostPosted: Thu Sep 28, 2017 10:21 am 
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


Top
 Profile  
 
 Offline
Giant
 
Joined: Mon Aug 03, 2015 5:30 pm
Posts: 227
 Post subject: Re: setCurrentMap and execlink
PostPosted: Thu Sep 28, 2017 11:58 am 
JamzTheMan wrote:
Yea... self-restraint is going to be needed, unless you want to buy everyone Core-I7's with 32gb ram. :-)


That's only $1,300, you know. (I just got a quote for work on exactly that from Dell.)


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 8 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there are 4 users online :: 0 registered, 0 hidden and 4 guests (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 4 guests





cron

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman