Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Blane on Sat 12/12/2009 22:47:03

Title: One-Click Interface (as seen in 7 days a Skeptic)
Post by: Blane on Sat 12/12/2009 22:47:03
I'm interested in having a one click interface in my game, as in, you click the object and the options/inventory items pop up in a window. An example of this can be seen in Yahtzee's 7 Days a Skeptic game. Does anyone know how to achieve this?

Thanks.
Title: Re: One-Click Interface (as seen in 7 days a Skeptic)
Post by: Baron on Sun 13/12/2009 01:57:09
OnAnyClick, or something like that  (under interactions for characters, objects, hotspots).

Unless you mean how to achieve this in terms of game play, in which case it's all about very careful puzzle design.
Title: Re: One-Click Interface (as seen in 7 days a Skeptic)
Post by: GarageGothic on Sun 13/12/2009 10:35:07
Try searching the forums for 'verbcoin' - it might not be exactly what you want, but close enough to use as a starting point. There should be several modules and templates available.
Title: Re: One-Click Interface (as seen in 7 days a Skeptic)
Post by: Helme on Sun 13/12/2009 10:41:51
I thought about making a GUI similar to '6 days a sacrifice' (I can't remember 7 days a skeptic but it seems to be the same) for my next bigger game, but I haven't finished the GUI yet.
Title: Re: One-Click Interface (as seen in 7 days a Skeptic)
Post by: Khris on Sun 13/12/2009 16:14:31
In on_mouse_click, use GetLocationType, and if something was clicked, open the inventory window. Then, eMouseRightInv triggers looking at the item, eMouseLeftInv invokes the action. If the inv item was the eye/hand, call inventory.[game.inv_actived].RunInteraction(eModeLookat/eModeInteract), otherwise eModeUseinv.
Title: Re: One-Click Interface (as seen in 7 days a Skeptic)
Post by: Blane on Sun 13/12/2009 22:22:25
Quote from: Khris on Sun 13/12/2009 16:14:31
In on_mouse_click, use GetLocationType, and if something was clicked, open the inventory window. Then, eMouseRightInv triggers looking at the item, eMouseLeftInv invokes the action. If the inv item was the eye/hand, call inventory.[game.inv_actived].RunInteraction(eModeLookat/eModeInteract), otherwise eModeUseinv.

Thanks, where do I set these? Do I have to set this for every object, or is there a universal Mouse Script I can use?

Sorry, newbie  ;D
Title: Re: One-Click Interface (as seen in 7 days a Skeptic)
Post by: Khris on Mon 14/12/2009 01:14:55
You have to change the function called on_mouse_click in the GlobalScript.
I'd post code but it's 2:14 AM here and I'm off to bed.
Title: Re: One-Click Interface (as seen in 7 days a Skeptic)
Post by: Blane on Thu 31/12/2009 01:50:24
Do you think this would work:

Have right click open the inventory, and have objects in the inventory for an eye, hand, mouth, etc, and when used, just do the same thing as the command.

That should do what I want, right?
Title: Re: One-Click Interface (as seen in 7 days a Skeptic)
Post by: Dualnames on Thu 31/12/2009 16:19:47
Quote from: Blane on Thu 31/12/2009 01:50:24
Do you think this would work:

Have right click open the inventory, and have objects in the inventory for an eye, hand, mouth, etc, and when used, just do the same thing as the command.

That should do what I want, right?

And here you go:

http://guidetoags.blogspot.com/search/label/7daysASceptic

It was asked by bicilotti on the forums some time ago. And I've posted it almost a year back on that blog thing.