Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: homey3 on Wed 11/08/2004 22:40:23

Title: hotspot and item question
Post by: homey3 on Wed 11/08/2004 22:40:23
Okay, I know there's a way to make it so that everytime a hotspot is clicked on by ANY inventory item (no matter which one) it runs a command so that I don't have to program it for every individual item that may be clicked on it.  How do I do that?

Also, is there a way to make an item display a specific message when it is clicked on something I don't already have programed?

Thanks.

Title: Re: hotspot and item question
Post by: Mr Jake on Wed 11/08/2004 22:46:03
Just dont do any conditional for the 'Inventory used with hotspot'

also for your second question there is 'Unhandled_event' (check manual)

also.

:=
Title: Re: hotspot and item question
Post by: homey3 on Wed 11/08/2004 23:08:10
Thanks, let me clarify.  There are certain hotspots that I want something to happen if a certain item is clicked on it, but I want another message if anything else is clicked on it.  If I add a conditional, won't it do both?
Title: Re: hotspot and item question
Post by: Ashen on Thu 12/08/2004 00:04:04
Using scripting, it would be:

if (player.activeinv == 2) { //or whichever item you want
Ã,  // What you want to happen
}

else Display ("I can't use that here");

Using the interaction editor:

Conditional - If inventory item was used (2) //or whatever
Ã,  Ã,  What you want to happen
Ã,  Ã,  Stop running more commands
Game - Display a message (4) // or whatever

The key line being the 'Stop running more commands' inside the conditional. Hope this helps.

Edit: Either of these would be in the hotspots 'Use inventory with hotspot' interaction, obviously.
Title: Re: hotspot and item question
Post by: homey3 on Thu 12/08/2004 06:08:32
Bingo!  Thanks.