Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   x/y - screenwidth/screenheight (https://forums.graalonline.com/forums/showthread.php?t=36970)

voicedcow6666 08-31-2002 03:20 AM

x/y - screenwidth/screenheight
 
ok, let me try to explain what's going on. I've been racking my brain for this for awhile, I've got it somewhat figured out though.


I have an image I'm displaying on the client's screen using showimg and changeimgvis of 4, so it's using screenwidth/screenheight. There is a part of this menu I want to be able to click on to make changes happen. This is the part I'm having trouble with, I have to convert the mousex/mousey to work with screenwidth/screenheight.

I dunno, anyone know how to do this? I'm giving myself a headache trying to think about it....

screen_name 08-31-2002 03:43 AM

GrowlZ:

No need. Ever heard of mousescreenx and mousescreeny? They return the location of the mouse in pixels. mousex and mousey only show the location on the game screen (x,y of 0,63).

voicedcow6666 08-31-2002 03:48 AM

Quote:

Originally posted by screen_name
GrowlZ:

No need. Ever heard of mousescreenx and mousescreeny? They return the location of the mouse in pixels. mousex and mousey only show the location on the game screen (x,y of 0,63).




oooooohhhhhh ok, thanks. <3

screen_name 08-31-2002 03:49 AM

GrowlZ:

No problem. :) Need any more help, just post, and I'll see what I can do.

emortylone 08-31-2002 05:26 AM

HOw do you use mousescreenx and mousescreeny? I haven't had a use for these yet, but I figure I'd do an abs(mousex-screenwidth/2)=<1 or whatever. Hmm...
---Shifter

screen_name 08-31-2002 08:45 AM

NPC Code:

if (mousescreenx in |5,50| && mousescreeny in |5,50|) {
setplayerprop #c, #v(mousescreenx),#v(mousescreeny);
} else {
setplayerprop #c, ;
}



Simple code. :p

emortylone 09-02-2002 02:40 AM

lol. I have never used in but I've seen it. x.x
---Shifter

osrs 09-05-2002 12:32 AM

Quote:

Originally posted by screen_name
NPC Code:

if (mousescreenx in |5,50| && mousescreeny in |5,50|) {
setplayerprop #c, #v(mousescreenx),#v(mousescreeny);
} else {
setplayerprop #c, ;
}



Simple code. :p

with "Mousedown" works?


All times are GMT +2. The time now is 09:29 AM.

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