Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: rtf on Fri 13/02/2004 21:17:13

Title: Single Inventory Item Response Question
Post by: rtf on Fri 13/02/2004 21:17:13
Hey, wat up?

I have a question.
When you do an interaction "Use Inventory on this Object"  it seems kind of vauge becasue you would want to make it so that if you use a Certain inventory item of the object the event will occur.

How do you make it so that the next script will run only is I use Inventory Item 8?


Thanks
Title: Re:Single Inventory Item Response Question
Post by: Darth Mandarb on Fri 13/02/2004 22:01:24
Inside "Use Inventory on this Object" you use a conditional statement "If Inventory Item Was Used".
Title: Re:Single Inventory Item Response Question
Post by: rtf on Fri 13/02/2004 22:34:17
Quote from: Darth Mandarb on Fri 13/02/2004 22:01:24
Inside "Use Inventory on this Object" you use a conditional statement "If Inventory Item Was Used".


OK, thanks.  It's a little comfusing, but it'll get the hang of it.
Title: Re:Single Inventory Item Response Question
Post by: Darth Mandarb on Fri 13/02/2004 23:39:58
Look at it this way:

Each section of the Interactions Menu represents certain 'clicks' on the Object/Hotspot.  So essentially each section represents a Cursor Mode.

Player stands on Hotspot (Walk) - Cursor Mode 0
Look at Hotspot (Look) - Cursor Mode 1
Interact Hotspot (Interact) - Cursor Mode 2
Use Inventory on Hotspot (Inventory) - Cursor Mode 4
Talk to Hotspot (Talk) - Cursor Mode 3
Take Hotspot (Take) - Cursor Mode 5

So Use Inventory on Hotspot basically just means, "if cursor mode 4 is used on hotspot".  Cursor mode 4 accesses the Active Inventory Item.

It makes more sense to do it this way because then you can have multiple inventory items interacting with each hotspot(s) and/or object(s) rather than just one item!

Ex:
Use Inventory on Hotspt
- If inventory[1] is used
- - do this action
- If inventory[2] is used
- - do this action

and so on.

Once you play around with this for awhile it'll become much easier and you won't even have to think about it!

Hope that helps!

~ d
Title: Re:Single Inventory Item Response Question
Post by: rtf on Fri 13/02/2004 23:43:49
Alright, thanks, Mandarb
You are really smart!

Too bad you crossed over to the dark side  :-\

I'm killing me!