Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   screenx/y (https://forums.graalonline.com/forums/showthread.php?t=39767)

Loriel 10-29-2002 02:52 AM

screenx/y
 
NPC Code:

if (created || timeout) {
showimg 0,@X,screenx(mousex,mousey),screeny(mousex,mousey) ;
changeimgvis 0,4;
setplayerprop #c,#v(screenx(mousex,mousey)) #v(screeny(mousex,mousey));
timeout = 0.05;
}


It is giving me negative values, while I am under the strong impression that it should not. :\

R0bin 10-29-2002 03:55 AM

Re: screenx/y
 
Quote:

Originally posted by Loriel
NPC Code:

if (created || timeout) {
showimg 0,@X,screenx(mousex,mousey),screeny(mousex,mousey) ;
changeimgvis 0,4;
setplayerprop #c,#v(screenx(mousex,mousey)) #v(screeny(mousex,mousey));
timeout = 0.05;
}


It is giving me negative values, while I am under the strong impression that it should not. :\



....


why not just do

if (created || timeout) {
showimg 0,@X,mousescreenx,mousescreeny;
changeimgvis 0,4;
setplayerprop #c,#v(mousescreenx) #v(mousescreeny);
timeout = 0.05;
}

????

Dach 10-29-2002 02:03 PM

Works fine for me, unless you go off the graal window, where it should be negative.

Robin, sorry to sound pissy, but that is a testing script... it serves no more purpose than to test the effects of the functions

Loriel 10-30-2002 03:17 AM

Quote:

Originally posted by Dach
Works fine for me, unless you go off the graal window, where it should be negative.
Hey, it really does. I must have messed something else in the big script then.

Loriel 10-30-2002 04:09 AM

Quote:

Originally posted by Loriel

Hey, it really does. I must have messed something else in the big script then.

I figured it out.
NPC Code:
if (playerenters) toweapons Test;
if (created || timeout) {
if (isweapon) setplayerprop #c,#v(screenx(mousex,mousey)) #v(screeny(mousex,mousey));
else message #v(screenx(mousex,mousey)) #v(screeny(mousex,mousey));
timeout = 0.05;
}



Then you see that screenx/y do not work inside a weapon, because it is setting your chattext to different values than the ones the NPC itself is chatting.

R0bin 10-30-2002 06:27 AM

Quote:

Originally posted by Dach
Works fine for me, unless you go off the graal window, where it should be negative.

Robin, sorry to sound pissy, but that is a testing script... it serves no more purpose than to test the effects of the functions

you are trying to sound pissy? X_X

Dach 10-30-2002 11:09 AM

Quote:

Originally posted by Loriel

Then you see that screenx/y do not work inside a weapon, because it is setting your chattext to different values than the ones the NPC itself is chatting.

Whoa, that's a bit goofed...

Quote:

Originally posted by R0bin

you are trying to sound pissy? X_X

bah, I figured someone may try to yell at me for demeaning you, nm


All times are GMT +2. The time now is 03:49 PM.

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