FEATURE: updateView()
Moderators: dorpond, trevor, Azhrei
Forum rules
Posting now open to all registered forum users.
Posting now open to all registered forum users.
FEATURE: updateView()
I was wondering, is it possible to have a function that: when called, it updates the current view and 'transmits' is through the server to the clients.
Currently the view is updated AFTER the macro is done. You could e.g. use a loop to update the x/y position of a token 10 times, but you will only see the last step.
The only way round this is by using deferred macro calls (as that effectively closes a macro thread and then starts a new one).
It would however be wonderful if the system could be forced to update on a call. This would simplify animations immensily and probly other stuff as well (which i can't think of currently).
O have no clue how hard it is and its certainly not top priority, but fits the 'nice to have' category quite nicely!
Currently the view is updated AFTER the macro is done. You could e.g. use a loop to update the x/y position of a token 10 times, but you will only see the last step.
The only way round this is by using deferred macro calls (as that effectively closes a macro thread and then starts a new one).
It would however be wonderful if the system could be forced to update on a call. This would simplify animations immensily and probly other stuff as well (which i can't think of currently).
O have no clue how hard it is and its certainly not top priority, but fits the 'nice to have' category quite nicely!
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: FEATURE: updateView()
It actually may not be to hard to make the call but...
We would need to test but it MAY be possible. It's one of those, it's either easy and just a call to the server to "update" or it's a can of worms.
Just have to make sure in that if the call is made, tokens stay in context and all that and that it doesn't "flush" anything in memory that would be needed later in the macro...
We would need to test but it MAY be possible. It's one of those, it's either easy and just a call to the server to "update" or it's a can of worms.
Just have to make sure in that if the call is made, tokens stay in context and all that and that it doesn't "flush" anything in memory that would be needed later in the macro...
-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
- JamzTheMan
- Great Wyrm
- Posts: 1872
- Joined: Mon May 10, 2010 12:59 pm
- Location: Chicagoland
- Contact:
Re: FEATURE: updateView()
That would be a little more tricky. Holding thread processing and all that.
In what context would you use it?
In what context would you use it?
-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: updateView()
For animations. Move, update map view, pause, repeat.
- JamzTheMan
- Great Wyrm
- Posts: 1872
- Joined: Mon May 10, 2010 12:59 pm
- Location: Chicagoland
- Contact:
Re: FEATURE: updateView()
Ah ok, I can see it now. Nice cut scene macro could switch to a map, zoom in on slowly on an image, pan over, slowly zoom out...
Sold.
Sold.
-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: updateView()
funny, that was exact why I started this thread, I was testing the new zoom function...JamzTheMan wrote:Ah ok, I can see it now. Nice cut scene macro could switch to a map, zoom in on slowly on an image, pan over, slowly zoom out...
Sold.
o and dont' forget the music score in the background!
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: updateView()
upto now the only 2 times I use a delay function are:RPTroll wrote:How about a built in delay function as well?
1. animations
2. onTokenSelectEvent (which fires off 3 times in a row when you select a token, so I use a 'delay' before it can be run again)
its only in animations though that its actually a function called 'delay(). The other is a much more complicated implementation where effectively you never see the function 'delay()' appear.
Hence delay() afaik would only be used in animations AND it would only be used icw updateView(). Hence would it not be better to have:
Code: Select all
updateView(delay)
And if you want to make it really fancy it checks when the last 'updateView' was called and the delay references to that call. So
[udpateView(10)] means that it will update the view AFTER at least 10ms have passed since the last updateView. (and if its the first it will thus execute immediately)
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: updateView()
split off the setViewArea discussion to: http://forums.rptools.net/viewtopic.php?f=86&t=25961
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: updateView()
I like the idea of delay as a parameter.
There may be more use cases for delay(), such as in forms and dialogs.
Don't forget on-map dice rolls <ducks>
There may be more use cases for delay(), such as in forms and dialogs.
Don't forget on-map dice rolls <ducks>