I would like to see an event onMapChange, like the onCampaignLoad event.
Because MapTool can play MP3 now, I would like to add some ambient music to my campaign. This music should be linked to the current visible map of the player. So I'm thinking of an onMapChange event, added to my global lib-token. Every time a player is changing his shown map, this event should be fired, stops the current music, take the current visible map name and start playing the associated music.
Because every player could be on his own map, this must be "per player" event.
But I haven't seen an event like onMapChange or have I missed something?
Kind regards
from Purzelkater
onMapChange anywhere?
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
Re: onMapChange anywhere?
There has been some talk on a "onMapLoad" event here, but so far no one stepped forward to implement it.
MT Framework: Call of Cthulhu 7th fork, D&D 5e Spell Library
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
Re: onMapChange anywhere?
its one of the reasons I build the switch map macro in the BoT. This function, next to dragging all relevant tokens to the new map also centres all views on the correct spot. Something that bothered me was not possible. Although in reality I use teleports mostly to switch maps and there too have I the possibility to add addtional code to do stuff.
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: onMapChange anywhere?
I have implemented the "onChangeMap" event in my "Joe's Ugly Hacks" macro libraries (see the User Creations forum), but it won't be released until this weekend.Purzelkater wrote: ↑Mon Nov 04, 2019 1:47 amI would like to see an event onMapChange, like the onCampaignLoad event.
Works great though!
"Joe's Ugly Hacks - Get 'em while their hot! Guaranteed ugliest hacks around or your money back!"
Re: onMapChange anywhere?
This has now (finally) been released.
Check it out in the "User Creations -> Drop-in Libraries" forum.
"Joe's Ugly Hacks - Get 'em while their hot! Guaranteed ugliest hacks around or your money back!"