Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-29-2002, 10:00 PM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
Mouse!

How do you do a Mouse Over and Mouse Click commands?
  #2  
Old 06-29-2002, 10:42 PM
Shiftk03- Shiftk03- is offline
I am the trap
Shiftk03-'s Avatar
Join Date: Nov 2001
Location: Dirty South
Posts: 1,688
Shiftk03- will become famous soon enough
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.
__________________
  #3  
Old 06-30-2002, 12:40 AM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
okay... but doesnt say mouse over?
  #4  
Old 06-30-2002, 02:53 AM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
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

}

__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
  #5  
Old 06-30-2002, 03:16 AM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
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
  #6  
Old 06-30-2002, 05:39 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
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.
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
  #7  
Old 06-30-2002, 06:57 AM
davidpsy davidpsy is offline
Over Nine THOUSAND!!!!!!!
davidpsy's Avatar
Join Date: Mar 2002
Location: Bandiria
Posts: 5,514
davidpsy is on a distinguished road
Send a message via AIM to davidpsy
i like south part but man you can
Quote:
fuzz your self go fuzz your mama and now get the fuzz out
__________________
-Donald Shimoda
Level oo.

Forces greater than your self, can be over come.
  #8  
Old 06-30-2002, 07:28 AM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
Quote:
Originally posted by davidpsy
i like south part but man you can
I think both of you should be banned for 2 weeks.
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
  #9  
Old 06-30-2002, 12:09 PM
davidpsy davidpsy is offline
Over Nine THOUSAND!!!!!!!
davidpsy's Avatar
Join Date: Mar 2002
Location: Bandiria
Posts: 5,514
davidpsy is on a distinguished road
Send a message via AIM to davidpsy
hay he started it im olny mean to people when they are mean to me
__________________
-Donald Shimoda
Level oo.

Forces greater than your self, can be over come.
  #10  
Old 06-30-2002, 12:12 PM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
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.
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
  #11  
Old 06-30-2002, 12:50 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
this is gettin a little off topic, god knows how this got from help me with mouse commands to telling people to go **** themselves
Closed Thread


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:25 AM.


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