Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-10-2002, 09:15 PM
Shorty2Dope Shorty2Dope is offline
Psychopathic
Shorty2Dope's Avatar
Join Date: Oct 2001
Location: Insane Asylum
Posts: 3,290
Shorty2Dope is on a distinguished road
Send a message via AIM to Shorty2Dope Send a message via Yahoo to Shorty2Dope
Mouse and keyboard commands/variables

Can anyone post a simple script on how to use them. I read the newfeatures and I tried it out but it would not work. helpsie

(if you could put as many comments about it explaining how it works, I am trying to learn graal scripting)

If you don't want people stealing the script just PM me it please.
__________________
blah
Reply With Quote
  #2  
Old 06-10-2002, 09:26 PM
Projectshifter Projectshifter is offline
The David
Projectshifter's Avatar
Join Date: Apr 2002
Location: USA
Posts: 912
Projectshifter is an unknown quantity at this point
Send a message via ICQ to Projectshifter Send a message via AIM to Projectshifter Send a message via MSN to Projectshifter Send a message via Yahoo to Projectshifter
They are not too hard of scripts. There are several mouse ones, but the most common would probably be:
actionleftmouse
and
actionrightmouse
those are only activated if the NPC is clicked w/ that mouse button. I don't exactly remember off the top of my head for the new keyboard ones, I should know though b/c I do it enough ,lol. I think it is like:
if (keydown2){
if (#p1(letter)){action;}
}
try that. If not keydown2, try keypress. Just copy and paste from the new features and you should be able to play w/ it a bit.
---Shifter
__________________
Who has time for life these days?
Reply With Quote
  #3  
Old 06-10-2002, 09:48 PM
Shorty2Dope Shorty2Dope is offline
Psychopathic
Shorty2Dope's Avatar
Join Date: Oct 2001
Location: Insane Asylum
Posts: 3,290
Shorty2Dope is on a distinguished road
Send a message via AIM to Shorty2Dope Send a message via Yahoo to Shorty2Dope
Quote:
Originally posted by Projectshifter
They are not too hard of scripts. There are several mouse ones, but the most common would probably be:
actionleftmouse
and
actionrightmouse
those are only activated if the NPC is clicked w/ that mouse button. I don't exactly remember off the top of my head for the new keyboard ones, I should know though b/c I do it enough ,lol. I think it is like:
if (keydown2){
if (#p1(letter)){action;}
}
try that. If not keydown2, try keypress. Just copy and paste from the new features and you should be able to play w/ it a bit.
---Shifter
The key one don't work, thats the one I mostly had a problem with. Also how do you make it tell if the key is being held down or not?

[EDIT]Ok I figured it out, what you gave me helped enough. Then I went back into the newfeatures and played with the variables/commands. yey![/EDIT]
__________________
blah

Last edited by Shorty2Dope; 06-10-2002 at 10:30 PM..
Reply With Quote
  #4  
Old 06-11-2002, 12:23 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
NPC Code:

if (keypressed){
if (keydown2(keycode(letter),true){
do this;
}
}



I believe that's how keydown2 works.

I forget how the mouse worked.

Just look at the newfeatures text file.
It explains it rather well.
__________________
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
Reply With Quote
  #5  
Old 06-11-2002, 01:10 AM
Projectshifter Projectshifter is offline
The David
Projectshifter's Avatar
Join Date: Apr 2002
Location: USA
Posts: 912
Projectshifter is an unknown quantity at this point
Send a message via ICQ to Projectshifter Send a message via AIM to Projectshifter Send a message via MSN to Projectshifter Send a message via Yahoo to Projectshifter
:P Beat ya m8, he he. Yeah, I am @ a school compy, so I can't really pull up my home comp and look, heh. Glad I could be of some help.
---Shifter
P.S. Some other mouse commands: leftmousebutton; rightmousebutton;
---Shifter
__________________
Who has time for life these days?
Reply With Quote
Reply


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 09:08 AM.


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