Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Bodenhorst on Tue 16/07/2024 21:51:51

Title: Displaying the name of what's under the curser [SOLVED]
Post by: Bodenhorst on Tue 16/07/2024 21:51:51
Hey guys,

though i am an absolute noob I achieved quite a lot with AGS and I learn more and more by time.

But there are some basic things I just can't wrap my head around and I only get confused
when searching for solutions in the forum.

For example:

I want to display what is under my curser in a textwindow.
I'm sure the GetLocationType-function would be helpful.
but how do I transfer the returning value into a string for my textbox?

A basically small step for most of you, but a milestone for my progress.
Already thank you very much.
Title: Re: Displaying the name of what's under the curser
Post by: Khris on Tue 16/07/2024 23:08:43
The easiest way is to set the label's text to "@OVERHOTSPOT@"; this is sufficient for characters, objects and hotspots.
If you also need inv items, buttons, etc. it gets slightly more complicated; check the reply I posted in the other thread: https://www.adventuregamestudio.co.uk/forums/index.php?msg=636664467
Title: Re: Displaying the name of what's under the curser
Post by: Bodenhorst on Wed 17/07/2024 07:28:57
Oh yes, worked perfectly! :-D

After all I found the mistake.
The method I used before also worked...
I just forgot to give the hotspot a description! (roll)

But by that I got to know more ways to achieve it and I'm sure It will come handy
if my script should become more complex.

I thank you sincerely once again.