Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-23-2002, 08:02 AM
graaliholic graaliholic is offline
Registered User
graaliholic's Avatar
Join Date: Jan 2002
Location: Canada!
Posts: 925
graaliholic is on a distinguished road
Send a message via AIM to graaliholic
Question Using the mouse

Could somebody explain to me how the mouse wheel works and maybe give me a short example?
__________________
Justin Yashimata - Uhh stuff o.O

Quote:
From an Instant Message Conversation
ChrisTheDuckMan: wts
ChrisTheDuckMan: you > me
Justin: pwned bish! ;-)
ChrisTheDuckMan: atfu
Reply With Quote
  #2  
Old 06-23-2002, 08:33 AM
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: Using the mouse

Quote:
Originally posted by graaliholic
Could somebody explain to me how the mouse wheel works and maybe give me a short example?
Well I suggest you start by reading your Newfeatures2002.txt in your Graal folder, it briefly explains the mousewheel and gives a small example on what is needed. If that don't help much, just PM me and I'll give you an example.
__________________
Reply With Quote
  #3  
Old 06-23-2002, 08:36 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
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
__________________

subliminal message: 1+1=3
Reply With Quote
  #4  
Old 06-23-2002, 08:41 AM
graaliholic graaliholic is offline
Registered User
graaliholic's Avatar
Join Date: Jan 2002
Location: Canada!
Posts: 925
graaliholic is on a distinguished road
Send a message via AIM to graaliholic
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.
__________________
Justin Yashimata - Uhh stuff o.O

Quote:
From an Instant Message Conversation
ChrisTheDuckMan: wts
ChrisTheDuckMan: you > me
Justin: pwned bish! ;-)
ChrisTheDuckMan: atfu
Reply With Quote
  #5  
Old 06-23-2002, 09:01 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
If you are confused about simple flags and variables, maybe you should concentrate on the basics first.
__________________

subliminal message: 1+1=3
Reply With Quote
  #6  
Old 06-23-2002, 09:33 AM
graaliholic graaliholic is offline
Registered User
graaliholic's Avatar
Join Date: Jan 2002
Location: Canada!
Posts: 925
graaliholic is on a distinguished road
Send a message via AIM to graaliholic
i know the basics! i just dont know how this particular command works
__________________
Justin Yashimata - Uhh stuff o.O

Quote:
From an Instant Message Conversation
ChrisTheDuckMan: wts
ChrisTheDuckMan: you > me
Justin: pwned bish! ;-)
ChrisTheDuckMan: atfu
Reply With Quote
  #7  
Old 06-23-2002, 10:07 AM
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
oh, I enlightened myself on actionmouseleft / right and double click yesterday.
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #8  
Old 06-23-2002, 10:23 AM
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
Quote:
Originally posted by graaliholic
i know the basics! i just dont know how this particular command works
Well its pretty self exclamitory. I could give an example but it would end up doing your script...and I'm not going to do that now am I?
__________________
Reply With Quote
  #9  
Old 06-23-2002, 10:28 AM
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 Shiftk03-


Well its pretty self exclamitory. I could give an example but it would end up doing your script...and I'm not going to do that now am I?
I don't have a mousewheel or a 3rd button on the mouse I use so it wouldn't help.
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #10  
Old 06-23-2002, 11:51 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
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.
__________________

subliminal message: 1+1=3
Reply With Quote
  #11  
Old 06-23-2002, 03:54 PM
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
watch my leetness.
NPC Code:

if (mousewheel) {
this.head = strtofloat(#e(4, strlen(#3)-4, #3));
this.head+=mousewheeldelta;
setplayerprop #3, head#v(this.head).png;
}


woot...shouldn't I mod these here forums, no?

moo....
__________________

!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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 04:37 PM.


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