![]() |
Using the mouse
Could somebody explain to me how the mouse wheel works and maybe give me a short example?
|
Re: Using the mouse
Quote:
|
If you are lazy
- the script functions for accessing the mouse are now available in the game, some new functions have been added: - 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 |
I already read that, and looked for other other people who have asked the same question, but i'm still confused about how it works.
|
If you are confused about simple flags and variables, maybe you should concentrate on the basics first.
|
i know the basics! i just dont know how this particular command works :(
|
oh, I enlightened myself on actionmouseleft / right and double click yesterday.
|
Quote:
|
Quote:
|
All the moust stuff is extra build-in flag and variables!!!
if(mousex in |30,40|) message pie!!!; or something. figure it out. If you can't, you don't know the basics becasue these are NOT commands, they are flags and variables. |
watch my leetness.
NPC Code: woot...shouldn't I mod these here forums, no? moo.... |
| All times are GMT +2. The time now is 09:14 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.