MOUSE
CLICK
(CM)
RECEIVER
Get/check/set info about mouse click. This receiver must follow after any !?CM trigger. (CM0/CM1/CM2/CM3/CM4/CM5)
!!CM:XXXX; | Get/check/set info about mouse click |
OPTIONS | |
Absolute position of a cursor in pixels $1 - x $2 - y |
|
Set/Check/Get
a battlefield position $ is a number of position. The hex grid follows the numbers we already have for it (0-186) in the docs for setting up the battlefields. The background and outside the grid is number -1. The left hero's number is 252. The right hero's number is 253. There's also some 254 areas along the extreme right edge of the screen below the right side hero but it only goes down about half way and the rest is -1. |
|
Flags 0=Left mouse click 1=Shift+Left mouse click 4=Ctrl+Left mouse click 32=Alt+Left mouse click 512=Right mouse click Numbers may be combined to check for combinations of Shift, Ctrl and Alt with the Left mouse click. For example, to check if a player holds down Shift+Ctrl and makes a Left mouse click, the number would be 5 (1+4=5). A Right mouse click cannot be combined with any of these keys. |
|
H$1/$2; | Give the number of heroes with new command: $1 - Number of the left hero $2 - Number of the right hero You can only check or get them. You can also use this command for !?CM2; section to get the left hero as an active. The second one is a phantom (there is no second one). |
Number with CM:I$ Adventure
Screen |
|
Mz# | Set the hint text in
the town screen, replacing the default hint with your own You can use global (z1..z1000) or local (z-1..z-10) z variables. Comments To get additional information on where the mouse is situated, you can use other !!CM commands: T, S, I, F, A. (See MM1 Trigger) Example: !#VRz10:S^Hi, fellow!^; !?MM1; !!CM:Mz10; |
Map position $1 - x $2 - y $3 - Level Comments: P command work only for items 1 (small map) and 37 (big map). |
|
Enable/Disable
standard reaction 0 - Disable 1 - Enable Comments: If you wanted a right-click on the adventure map to do something, you'd use a CM trigger to intercept it, then use CM:R to disable the standard do-you-want-to-leave-troops-here thing. |
|
Subtype of the action Left mouse push (subtype=12), left mouse release (subtype=13) and right mouse push (subtype=14) |
|
Type of an action (usually 512) |
Comments:
If you want to display a message box that doesn't remain on the screen
(like the normal one when a player right-clicks the mouse), use IF:Q with the
4 option. This will create a message box with no buttons (no Okay or cancel
button) that will only display while the mouse is held down. If you don't want
a picture, use a value of -1 for type and subtype. See the
Dialogue
Box Receiver page for more information on IF:Q.
Number with
CM:I Adventure Screen Town Screen Hero Screen Heroes visiting Screens Combat Screen |
Adventure
Screen
0 - area with no item number
|
Item (area) of the Town Screen
0: Level 1 Mage Guild Notes:
|
Hero Screen 0 Empty Areas
|
Heroes visiting Screens Common Left Hero Right Hero
|
Combat
Screen Mouse click Notes:
|