onMouseOverEvent: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(New page: 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': ...)
 
No edit summary
Line 5: Line 5:
And then creating a macro as a campaign property e.g.:
And then creating a macro as a campaign property e.g.:
     *onMouseOverOnceVar:[macro("onMouseOver@lib:onMouseOver"):currentToken()]
     *onMouseOverOnceVar:[macro("onMouseOver@lib:onMouseOver"):currentToken()]
If you create a lib token: lib:onMouseOver with the macro onMouseOver() then this macro will be called EVERY time you hover your mouse over a token.  
If you create a lib token: {{code|lib:onMouseOver}} with the (self created) macro {{code|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.
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.

Revision as of 10:24, 14 October 2011

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':

   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 of 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)