Quote:
Originally posted by Poogle
How do you do a Mouse Over and Mouse Click commands?
|
- mouse variables:
mousex, mousey - position of the mouse in the level
mousebuttons - tells you which mouse buttons are pressed,
it's a sum of the values 1 for left mouse button, 2 for middle
mouse button and 4 for the right mouse button, so it's 1+2+4=7
when all buttons are pressed; you can also use the flags described
later to easier check for the mouse buttons
mousescreenx, mousescreeny - position of the mouse in the game screen
mousewheeldelta - the movement of the mouse wheel in the last 0.05 seconds
- flags for checking if a mouse button is pressed:
leftmousebutton - is set when the left mouse button is down
middlemousebutton - is set when the middle mouse button is down
rightmousebutton - is set when the right mouse button is down
- events:
mousedown - occurs when a mouse button has been pressed, so
you can do things like if (mousedown && leftmousebutton) message hi;
mouseup - occurs when a mouse button has been released
mousewheel - occurs when the mouse wheel has been used
- triggered actions (only on npcs where the player has clicked on,
is also sent to the npcserver):
actionleftmouse - the player has clicked on the npc
actionmiddlemouse - the player has clicked with the middle mouse button on the npc
actionrightmouse - the player has right-clicked on the npc
actiondoublemouse - the player has double-clicked on the npc
Always read the newest features in your graal folder. This is an excerpt from the 2002 edition.