Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   screenx screeny worldx worldy (https://forums.graalonline.com/forums/showthread.php?t=58118)

Gman4pwnu 03-17-2005 06:02 AM

screenx screeny worldx worldy
 
why do they take the x and y? Shouldn't they just take x or y depending on if its screenx or y or worldx or y?

Kaimetsu 03-17-2005 06:04 AM

???

Gman4pwnu 03-17-2005 06:18 AM

worldx( x,y ) converts screen x,y to level x
worldy( x,y ) converts screen x,y to level y
screenx( x,y ) converts level x,y to screen x
screeny( x,y ) converts level x,y to screen y

Why does screenx need the levels x and y to tell me just the screens x

Evil_Trunks 03-17-2005 06:19 AM

maybe because that would limit their usefulness on a gmap?

(I am talking about 3D terrain here)

Kaimetsu 03-17-2005 06:22 AM

What do you think these functions do, and what arguments do you think they should take?

Gman4pwnu 03-17-2005 06:24 AM

well i mean screenx should only take x and screeny should only take y, same with worldx and y.

I mean it doesn't make sense to give it an x and y. All worldx does is convert the screens x to the levels x, I dont see wheres the Y comes in as any use, I mean you could put any number in there as the y and you'd get the same output.

Dach 03-17-2005 06:51 PM

3D terrain, as Evil said.
It affects the y coordinate, so I assume Stefan put the x,y in the screenx/worldx to keep continuity between functions.

Gman4pwnu 03-17-2005 07:37 PM

im working with 3d terrain and i see absolutely no differance, im basically using this to keep weather on the players screen :P

Gman4pwnu 03-18-2005 08:48 PM

I win the prize?

Kaimetsu 03-18-2005 09:34 PM

Quote:

Originally Posted by Gman4pwnu
I win the prize?

Uh, no. The mapping of ground coords to screen coords (and vice versa) is not linear in the y direction; it involves a modifier that can only be determined through use of an x coordinate.

Gman4pwnu 03-24-2005 06:33 PM

Ohh thats true, because the terrain can cause the coords to be in a differant place.


All times are GMT +2. The time now is 03:35 AM.

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