Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-27-2006, 11:36 PM
Bl0nkt Bl0nkt is offline
Era Developer
Bl0nkt's Avatar
Join Date: Mar 2005
Location: Pennsylvania
Posts: 1,589
Bl0nkt will become famous soon enough
Send a message via AIM to Bl0nkt
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.
Reply With Quote
  #2  
Old 03-27-2006, 11:51 PM
Maniaman Maniaman is offline
Registered User
Join Date: Aug 2005
Posts: 326
Maniaman is on a distinguished road
changeimgvis id,4
__________________

Current Maloria Event: (click to go to it)
Reply With Quote
  #3  
Old 03-27-2006, 11:55 PM
Bl0nkt Bl0nkt is offline
Era Developer
Bl0nkt's Avatar
Join Date: Mar 2005
Location: Pennsylvania
Posts: 1,589
Bl0nkt will become famous soon enough
Send a message via AIM to Bl0nkt
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.
Reply With Quote
  #4  
Old 03-28-2006, 12:17 AM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
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
Reply With Quote
  #5  
Old 03-28-2006, 01:12 AM
Bl0nkt Bl0nkt is offline
Era Developer
Bl0nkt's Avatar
Join Date: Mar 2005
Location: Pennsylvania
Posts: 1,589
Bl0nkt will become famous soon enough
Send a message via AIM to Bl0nkt
Ahh, I see. Simple enough.

How would you do that in GS1? I am using GS2, but I'm just curious.
Reply With Quote
  #6  
Old 03-28-2006, 01:24 AM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
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
Reply With Quote
  #7  
Old 03-28-2006, 01:26 AM
Bl0nkt Bl0nkt is offline
Era Developer
Bl0nkt's Avatar
Join Date: Mar 2005
Location: Pennsylvania
Posts: 1,589
Bl0nkt will become famous soon enough
Send a message via AIM to Bl0nkt
Always the laggy way out with GS1, huh.
Reply With Quote
  #8  
Old 03-28-2006, 01:28 AM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:58 AM.


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