Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: steptoe on Thu 14/06/2012 08:26:22

Title: SOLVED: Have player display in front of a GUI
Post by: steptoe on Thu 14/06/2012 08:26:22
Hi

I am trying to have player display in front of a GUI for practical purposes rather then use an image as I want it to have buttons, that the player can graphically interact with, and especially labels.

What would be the best way to achieve this?

cheers
Title: Re: Have player display in front of a GUI
Post by: EchosofNezhyt on Thu 14/06/2012 08:58:49
I don't think the player can be rendered in-front of GUI.

Though there might be a hack-y work around.
Title: Re: Have player display in front of a GUI
Post by: Khris on Thu 14/06/2012 09:15:53
The only way to do this is to get the character's current ViewFrame and coordinates and draw the sprite on a transparent GUI as big as the screen (by drawing it to a DynamicSprite's DrawingSurface, then setting the sprite as the GUI's background).
Title: Re: Have player display in front of a GUI
Post by: on Thu 14/06/2012 09:18:45
GUIs are drawn in front of everything else, so they will always overlay a character.

The "hack" would be to use another GUI displaying the player sprites. It's possible; buttons on a GUI can be animated so you can pretty much fake everything a player character does, but you will have to move the GUI around instead of a player.

[edit]
Or what Khris said ;)
Title: Re: Have player display in front of a GUI
Post by: steptoe on Thu 14/06/2012 09:18:54
Cheers Khris/Ghost,

I know about not really being able show in front of a GUI normally but hoped there would be a way around it.

I'll give suggestions a whirl  (nod)

thanks

Title: Re: Have player display in front of a GUI
Post by: Snarky on Thu 14/06/2012 10:17:43
Or (if this is only for a particular room of the game) you could make a "GUI" that actually consists of objects instead.