Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   worldx(x,y) and worldy(x,y) ? (https://forums.graalonline.com/forums/showthread.php?t=61655)

raiden0899 10-09-2005 12:14 AM

worldx(x,y) and worldy(x,y) ?
 
Can someone please explain what worldx(x,y) and worldy(x,y) do and how they are used?

EDIT:
Thanks Velox Cruentus, I get it now.

ChibiChibiLuc 10-09-2005 12:21 AM

It converts screen coordinates to level coordinates.
Like screenx(x,y) and screeny(x,y), but opposite.

Velox Cruentus 10-09-2005 01:14 AM

Alright...

screenx( mousex, mousey );

Basically, You have your screen width/height, and the level width height.
The function changes the level location to the same point on your screen. It's like... If you're trying to go from layer 3 to layer 4. Layer 4 is using screen location, and Layer 3 is using level location.

Velox Cruentus 10-09-2005 01:19 AM

Raiden (Owner) (Sat Oct 8 19:17:35 2005):
ok. kool. what about worldx(x,y)?
Velox Cruentus (Sat Oct 8 19:18:14 2005):
It does the opposite. It converts screen to level.
Raiden (Owner) (Sat Oct 8 19:18:29 2005):
ok. thanks
Velox Cruentus (Sat Oct 8 19:18:42 2005):
That explains everything?
Raiden (Owner) (Sat Oct 8 19:18:59 2005):
ya. i think i get it now

( For those who want to go on with this... )

ApothiX 10-14-2005 08:43 PM

Quote:

Originally Posted by Velox Cruentus
Raiden (Owner) (Sat Oct 8 19:17:35 2005):
ok. kool. what about worldx(x,y)?
Velox Cruentus (Sat Oct 8 19:18:14 2005):
It does the opposite. It converts screen to level.
Raiden (Owner) (Sat Oct 8 19:18:29 2005):
ok. thanks
Velox Cruentus (Sat Oct 8 19:18:42 2005):
That explains everything?
Raiden (Owner) (Sat Oct 8 19:18:59 2005):
ya. i think i get it now

( For those who want to go on with this... )

Why exactly did you post this, when someone already said:

Quote:

Originally Posted by ChibiChibiLuc
It converts screen coordinates to level coordinates.
Like screenx(x,y) and screeny(x,y), but opposite.

?

Velox Cruentus 10-15-2005 02:56 AM

He had not understood it beforehand. Thus, to clarify, I showed that he did understand, rather then just let other people explain. The two functions are pretty similar; if he didn't know one, the likelihood he didn't know the other is higher.


All times are GMT +2. The time now is 01:06 AM.

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