Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: isatche on Fri 22/01/2021 08:21:46

Title: I need help with using inventory item on the GUI element
Post by: isatche on Fri 22/01/2021 08:21:46
Hello,
I would like the player to be able to click on the small panel in the scene, then the GUI with detailed zoomed panel will open and I could use inventory item at the right place in the GUI.

To simplify the question, imagine something like this on the floor:
(https://ae01.alicdn.com/kf/HTB1v9zDpSBYBeNjy0Feq6znmFXaj/New-Baby-Intellectual-13-Holes-Blocks-Building-Game-Wooden-Toys-Geometric-Shapes-Early-Educational-Wooden-Toy.jpg)
when you click on it, it zooms to the top and you can use inventory items at the correct place.
Is there alternative to the "hotspot" that I can use on GUI?

Thank you :)
Title: Re: I need help with using inventory item on the GUI element
Post by: Khris on Fri 22/01/2021 09:13:33
You can use buttons for this. Then simply check  mouse.Mode == eModeUseinv  and  player.ActiveInventory  in the button's onClick function.

In theory you could also make the GUI non-clickable and use hotspots instead, in case you want the shapes of the clickable areas to be arbitrary.