FEATURE: setViewArea()
Moderators: dorpond, trevor, Azhrei
Forum rules
Posting now open to all registered forum users.
Posting now open to all registered forum users.
Re: FEATURE: setViewArea()
I'd rather not complicate these functions and have a separate way of calling functions on player clients.
- JamzTheMan
- Great Wyrm
- Posts: 1872
- Joined: Mon May 10, 2010 12:59 pm
- Location: Chicagoland
- Contact:
Re: FEATURE: setViewArea()
Well, I was thinking of end users. Doesn't do much good if only 6 high end macro coders use em.
At some point we need to start addressing the #1 complaint users have...
At some point we need to start addressing the #1 complaint users have...
-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: FEATURE: setViewArea()
I do agree, I just think a generic function to run a macro on another client or all clients is the way to go I think what I am saying is that broadcast should be easier to use? Possibly in the UI?
Re: FEATURE: setViewArea()
Amen, brother.JamzTheMan wrote:Well, I was thinking of end users. Doesn't do much good if only 6 high end macro coders use em.
At some point we need to start addressing the #1 complaint users have...
- JamzTheMan
- Great Wyrm
- Posts: 1872
- Joined: Mon May 10, 2010 12:59 pm
- Location: Chicagoland
- Contact:
Re: FEATURE: setViewArea()
Well, we sort of have that now. It is possible but have to admit not the easiest to work with. I would think the average GM wouldnt know how to do it.Jagged wrote:I do agree, I just think a generic function to run a macro on another client or all clients is the way to go I think what I am saying is that broadcast should be easier to use? Possibly in the UI?
As an example, for the audio functions I've worked on, I made sure you could play to other clients within the function set.
-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: FEATURE: setViewArea()
So something simple, like an optional extra parameter to enforce the view for everyone?
Code: Select all
[r:setView(x1,y1,x2,y2,all)]
- JamzTheMan
- Great Wyrm
- Posts: 1872
- Joined: Mon May 10, 2010 12:59 pm
- Location: Chicagoland
- Contact:
Re: FEATURE: setViewArea()
Yep. And it shouldn't be to hard, just adding and calling the server command IIRC.
And ya, trusted for that.
And ya, trusted for that.
-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: FEATURE: setViewArea()
setViewArea() Function
Sets the currently viewed screen area, set by two cell coordinates, so that the two cells are at the edge of the screen. If the map is "gridless", the coordinates will be pixel coordinates. A final optional parameter causes the view of any connected players to be set the same. Only GMs or trusted macros can trigger the view of all players to change.
Usage
Parameters
Sets the currently viewed screen area, set by two cell coordinates, so that the two cells are at the edge of the screen. If the map is "gridless", the coordinates will be pixel coordinates. A final optional parameter causes the view of any connected players to be set the same. Only GMs or trusted macros can trigger the view of all players to change.
Usage
Code: Select all
setViewArea(startX,startY,endX,endY)
setViewArea(startX,startY,endX,endY, allPlayers)
- startX - the x coordinate of the cell that will mark the upper left corner of the displayed area.
- startY - the y coordinate of the cell that will mark the upper left corner of the displayed area.
- endX - the x coordinate of the cell that will mark the lower right corner of the displayed area.
- endY - the x coordinate of the cell that will mark the lower right corner of the displayed area
- allPlayers - If set to true (1) and called from a trusted macro, all players views will be set
Code: Select all
[h:setViewArea(0,0,30,20)]
Code: Select all
[h:setViewArea(0,0,30,20,isGM())]
Re: FEATURE: setViewArea()
Pull request sent to Craig
Re: FEATURE: setViewArea()
wiki created: Wiki: setViewArea()
however I have to ask you to add the 'units' option so it aligns with all the other functions that are related
here an example:
Wiki: getTokenX()
its now that i realise that 'goto' does not have the units option neither, so i'll post this.
however I have to ask you to add the 'units' option so it aligns with all the other functions that are related
here an example:
Wiki: getTokenX()
its now that i realise that 'goto' does not have the units option neither, so i'll post this.
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: FEATURE: setViewArea()
Do you mean this? With units set to 0 for cells?
Can't say I like defaulting to pixels, the code is nice and neat as it stands, but I suppose consistency is the thing
I'd suggest that from the point of the Wiki, its surely better to say "pixels" than "units", since when the value is true you get pixels and when false you get cell coordinates?
Code: Select all
setViewArea(startX, startY, endX, endY, pixels, allPlayers)
I'd suggest that from the point of the Wiki, its surely better to say "pixels" than "units", since when the value is true you get pixels and when false you get cell coordinates?
Re: FEATURE: setViewArea()
Updated Pull request so that command format is now setViewArea(startX, startY, endX, endY, pixels, allPlayers).
Where pixels and allPlayers are optional. Pixels defaults to true and allPlayers defaults to false.
Done for consistency with other functions and to keep wolph42 happy
Where pixels and allPlayers are optional. Pixels defaults to true and allPlayers defaults to false.
Done for consistency with other functions and to keep wolph42 happy
Re: FEATURE: setViewArea()
lol thank you!.
We could have the default set up for a vote. I don't mind its default is to cells, as long as its consistent (so 0=cells and 1=pixels), that's the part I asked for, you did, im happy indeed. As for the unit default, If you like you can:
- leave it now
- put it up for a vote
- change the default back to 0
up to you.
We could have the default set up for a vote. I don't mind its default is to cells, as long as its consistent (so 0=cells and 1=pixels), that's the part I asked for, you did, im happy indeed. As for the unit default, If you like you can:
- leave it now
- put it up for a vote
- change the default back to 0
up to you.
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: FEATURE: setViewArea()
Its not the way I would have done it, but we should be consistent. So I will leave it as it is now Plus I don't want to muck Craig around with needless revisions!