![]() |
GUIs/HUDs
I'm trying to take an image and place it on a part of the player's screen (GUIs/HUDs). I've tried various formulas with screenx, screeny, worldx, worldy, etc and I can't figure it out.
Just requesting a little help. Edit: Take note that it should stay there while moving. |
changeimgvis id,4
|
and it was that simple all along...
You have no idea about the ridiculous formulas I created. Edit: I'm trying to show it at the bottom left of the screen. I can get it down there with screenheight/1.05, but it's only visible in fullscreen. |
You should use screenwidth-WIDTHOFIMAGE screenheight-HEIGHTOFIMAGE
ie a 32x32 image (to put in very bottom right corner) would be screenwidth-32,screenheight-32 also, to make sure that it always stays there you should (if this is on GS2 which I assume it is) check if the GraalControl is resized. can do that by simple Gui functions.. ie: function GraalControl.onResize() and reposition the image using with(findimg(INDEX)) and changing the x y |
Ahh, I see. Simple enough.
How would you do that in GS1? I am using GS2, but I'm just curious. |
in GS1 graalcontrol cant be resized (as far as I know) so the only real way to make sure its always in the same spot is to put it on timeout loop and check if the screenwidth/height has changed and if it has show the image again at the right x,y
|
Always the laggy way out with GS1, huh.
|
Yes, unfortunately.
It cuts down a lot if you do the checking if screenwidth/height has changed instead of constantly doing showimg.. but still the annoying timeout loop. I try to avoid timeout loops if at all possible on Mana Realms to cut down on CPU Time. |
| All times are GMT +2. The time now is 06:16 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.