Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: dikla on Fri 30/04/2004 00:57:05

Title: hotspot-inventory
Post by: dikla on Fri 30/04/2004 00:57:05
can i use inventory on hotspot? since we cant open things like drawer, i want the character to touch the hotspot and display a massage "you took the key"(i mean when you dont want the character see the item at all in the room but see it in the inventory.  i know how to do it with objects and i tried to do it in the interaction of hotspot but nothing happen. can i do it  and how. thank you
Title: Re:hotspot-inventory
Post by: strazer on Fri 30/04/2004 01:22:32
I don't know what you're asking exactly.
Do you want to give the player an inventory item when he clicks on the hotspot or do you want to use an item from your inventory on the hotspot? Please rephrase.
Title: Re:hotspot-inventory
Post by: dikla on Fri 30/04/2004 01:27:44
my char. looking for recipe in drawer. since i can not open the drower i did a hotspot and i want wher touch it, display a massage "you took the recipe" and when the cha. look at the inventory she will find the recipe. i have the spirte in the inventory and tried "player give...." but when i open my inventory i see nothing (i specified the item no).
Title: Re:hotspot-inventory
Post by: Ashen on Fri 30/04/2004 01:34:10
The simplest way to do this goes:
Create a variable called GotRec (this can be a Room variable).
Message 0 should say "You got the Recipe!" or something similar
Message 1 should say "There's nothing else in the drawer."

Make the drawer a hotspot.
In the Interaction Editor, it would look something like:

Interact Hotspot
 - Conditional: If variable is set to a certain value (GotRec, 0)
     Game - Display a message (0)
     Player - Give player an inventory item (1) [or what ever the inv number is]
     Game - Set variable value (GotRec, 1)
     Stop running more commands
Conditional: If variable is set to a certain value (GotRec, 1)
     Game - Display a message (1)


Title: Re:hotspot-inventory
Post by: dikla on Fri 30/04/2004 01:43:26
sorry for my ignorence but where can i find the "variable" to creat it?
Title: Re:hotspot-inventory
Post by: Ashen on Fri 30/04/2004 01:53:34
In the Interaction Editor, when you open the 'Conditional: Variable set to a certain value' option, and click the 'change' button, you can see an 'Edit variable' button. This lets you create Room/Global variables.
Title: Re:hotspot-inventory
Post by: dikla on Fri 30/04/2004 01:56:16
you are so nice. thank you very very much.