Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Mouse! (https://forums.graalonline.com/forums/showthread.php?t=32552)

Poogle 06-29-2002 10:00 PM

Mouse!
 
How do you do a Mouse Over and Mouse Click commands?

Shiftk03- 06-29-2002 10:42 PM

Re: Mouse!
 
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.

Poogle 06-30-2002 12:40 AM

okay... but doesnt say mouse over?

adam 06-30-2002 02:53 AM

Quote:

Originally posted by Poogle
okay... but doesnt say mouse over?

Mouse over can be done easily with a few commands.


NPC Code:

if ( mousex in |xmin,xmax| ) && mousey in |ymin,ymax| ){

// do this

}


Poogle 06-30-2002 03:16 AM

Quote:

Originally posted by adam



Mouse over can be done easily with a few commands.


NPC Code:

if ( mousex in |xmin,xmax| ) && mousey in |ymin,ymax| ){

// do this

}


Thank you, And David f*ck you, seriously

Saga2001 06-30-2002 05:39 AM

Quote:

Originally posted by Poogle
Thank you, And David f*ck you, seriously
That was really un-needed. You should watch your language, even if it is "bleated" there is no reason to post that. Also I had an idea (to mods). It should be added, somehow so that you can easily quote the most recent newfeatures.txt. That would be sexy.

davidpsy 06-30-2002 06:57 AM

i like south part but man you can
Quote:

fuzz your self go fuzz your mama and now get the fuzz out

adam 06-30-2002 07:28 AM

Quote:

Originally posted by davidpsy
i like south part but man you can
I think both of you should be banned for 2 weeks.

davidpsy 06-30-2002 12:09 PM

hay he started it im olny mean to people when they are mean to me

Torankusu 06-30-2002 12:12 PM

Quote:

Originally posted by davidpsy
hay he started it im olny mean to people when they are mean to me
well yeah okay maybe you should use punctuation because maybe people are mean to you and all you do is repeat everything you've said and it makes it reall hard to read and people are mean to you for it so you are mean to you for that and they they are mean back because when you are mean to them for being mean to you because you do not use punctuation maybe you should use it.. just a suggestion because punctuation is actually good in some cases, where repititiousness is ANNOYING.

Python523 06-30-2002 12:50 PM

this is gettin a little off topic, god knows how this got from help me with mouse commands to telling people to go **** themselves


All times are GMT +2. The time now is 06:21 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.