onMouseOverEvent

From RPTools Wiki
Revision as of 12:55, 14 February 2012 by JML (talk | contribs) (Adding links to relevant tutorials and a few typographical tweaks)
Jump to navigation Jump to search

This is a FAKE event. You will need to create a macro and turn on some settings in Maptool to emulate this.

This event can be simulated by turning on "Show stat sheet on mouse over" in the MapTool Preferences:

   menu--> edit --> preferences --> Interactions --> 'Tokens' box: at the bottom --> check the checkbox

And then creating a macro as a campaign property e.g.:

   *onMouseOverOnceVar:[macro("onMouseOver@lib:onMouseOver"):currentToken()]

If you create a lib token lib:onMouseOver with the (self created) macro onMouseOver() then this macro will be called EVERY time you hover your mouse over a token.

Note that this is extremely tricky and can result in system crashes or lock-ups if done incorrectly. The point is that the macro is called continuously when you hover over the token, so you have to take that into account when creating the macro.

You can download a drop-in here [1] that shows two methods that use this event. One method will run only once, this can be used e.g. to setup a token after you dragged it onto the map. The other method will run every time you hover over a token (but not continuously)