Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: FartyPenguin on Thu 22/11/2007 23:35:34

Title: turning a hotspot on in another room (SOLVED)
Post by: FartyPenguin on Thu 22/11/2007 23:35:34
A few months ago I started using AGS and liked it, but I had to stop after a very short time due to problems with my computer. Now, I find the programme on my computer and decided to start using AGS again and try to finish what I started.

Anyway, here goes my question, and I will try to word it as best as I can. I have a a statue in room 1, it can only be observed (which displays a basic message). When I go into another room and press a specific switch, it allows the same statue to be talked too and can now be interacted with. Both the statue and the switch are just parts of my background so I have to use Hotspots (I think). However, the only way I can find to do what I am trying to do is add an inventory item once the switch is pressed, then have it removed once used on the statue; but I don't want anything to go in the inventory, I just want it to just happen... Any tips on how to do this?
Title: Re: I'm very new to this and need help... (Interactions related)
Post by: Khris on Thu 22/11/2007 23:42:00
From the BFAQ (http://americangirlscouts.org/agswiki/index.php/Category:AGS_Beginners%27_FAQ), which you're supposed to read before posting here:
QuoteNOTE: Please keep the following in mind. Most of our problems can be easily solved using variables. Need to change a hotspot's state in another room? Use variables! [...]
It's funny how the very first example hits your problem right on the head.
Actually, it isn't.

Make sure to check out this page (http://americangirlscouts.org/agswiki/Scripting%2C_Code_%26_Interaction#Working_with_variables:_the_basics), too.
Title: Re: I'm very new to this and need help... (Interactions related)
Post by: Ashen on Thu 22/11/2007 23:46:40
Beaten to it again. Curse you, KhrisMUC :)

FartyPenguin, as Khris (and the BFAQ) said: use variables. Just check the value instead of whether the player has the Inventory Item, and you're good.

If this is something you're going to be doing a lot, strazer's OtherRoom module (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=20650) might be of use.

Also, use descriptive thread titles, please.
Title: Re: turning a hotspot on in another room
Post by: FartyPenguin on Thu 22/11/2007 23:58:29
Thanks for the quick responses. :)