Graal Forums

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

nyghtGT 05-23-2002 05:41 AM

Mouse Functions...
 
Can anyone tell me (the commands) I would need to make it so if I clicked on a certain point in a level I could set a variable, such as:
display=1;

Spanko 05-23-2002 05:45 PM

You need the varuiables mousex and mousey, and the flag leftmousebutton

No commands are necesarry though :P

LilNiglet 05-23-2002 06:38 PM

Quote:

Originally posted by Spanko
You need the varuiables mousex and mousey, and the flag leftmousebutton

No commands are necesarry though :P

The variable mousebuttons works better. :P

Spanko 05-23-2002 06:40 PM

Quote:

Originally posted by LilNiglet

The variable mousebuttons works better. :P

I haven't used it yet, so bleh.

BBflat 05-23-2002 07:55 PM

I don't have NewFeatures 2002 with me, but is mousex the x coordinate of the mouse on the level, or on the screen?

Spanko 05-23-2002 08:07 PM

Quote:

Originally posted by BBflat
I don't have NewFeatures 2002 with me, but is mousex the x coordinate of the mouse on the level, or on the screen?
mousex is level.
mousescreenx is screen.

BBflat 05-23-2002 08:09 PM

Quote:

Originally posted by Spanko
mousex is level.
mousescreenx is screen.

Hm. So there's nothing for the levelx the mouse is on? You could do cool things like killing people by clicking on them. Lol.

Projectshifter 05-23-2002 08:45 PM

if (hasweapon(grenade)&&weaponfired) showimg crosshiar.gif,mousex,mousey; this.grenade=1;
if (this.grenade==1&&leftmousebutton) putexplosion 1,mousex,mousey;
:P He he. Would put an explosion where you click. I believe that would work. Haven't tested it b/c i'm @ school, but you could actually make it THROW a grenade if you wanted, requires more scripting, which is more time than i have ATM.
---Shifter

Spanko 05-23-2002 09:02 PM

Quote:

Originally posted by BBflat

Hm. So there's nothing for the levelx the mouse is on? You could do cool things like killing people by clicking on them. Lol.

levelx == mousex.

Projectshifter 05-23-2002 09:24 PM

LOL, i need it to be if (this.grenade==1) timeout=0.05;
if (timeout&&this.grenade==1) then set the x's and y's of the mouse. Otherwise it wouldn't cycle through it. It would happen but once.
---Shifter

BBflat 05-24-2002 05:16 AM

Haha this stuff is awesome. You can do things like keeping people from right-clicking you to get your profile. Cool stuff.


All times are GMT +2. The time now is 08:01 PM.

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