Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   GUI @ player.xy (https://forums.graalonline.com/forums/showthread.php?t=134269063)

sssssssssss 02-01-2014 04:50 AM

GUI @ player.xy
 
Is there a way to show a GUI image ctrl at the player.x and player.y? I've tried it on layer 1 and 0 and it didn't work. :/

cbk1994 02-01-2014 05:52 AM

Quote:

Originally Posted by sssssssssss (Post 1725799)
Is there a way to show a GUI image ctrl at the player.x and player.y? I've tried it on layer 1 and 0 and it didn't work. :/

You can't show GUIs at level coords. You can convert between level and screen coords if you want, though.

sssssssssss 02-01-2014 05:53 AM

how would you do that? I tried localtoglobalcoords/globaltolocal, but i'm not really sure how to do it in this situation to be honest.

cbk1994 02-01-2014 05:58 AM

I had the same question 7 years ago, and also tried using globaltolocalcoords without understanding what it does. Quoting:

Quote:

Originally Posted by godofwarares (Post 1309884)
If I understand, You want to change the level coordinates to screen coordinates. To do this:

PHP Code:

screenx(xy)
screeny(xy

They will return the screen position at (x, y).


sssssssssss 02-01-2014 06:04 AM

You're my hero you know that?


All times are GMT +2. The time now is 02:26 PM.

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