Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Tom on Tue 22/04/2003 00:16:30

Title: Temporarily disabling hotspots.
Post by: Tom on Tue 22/04/2003 00:16:30
I haven't updated my AGS for a while up to now, so I apologise if this is a Newbee sort of question and it's in the wrong forum.

In my game I want it so you shoot some dude in a hotel and it shows a cutscene and returns to the town map. That works fine, but then I want the previously accessable hotel hotspot to be disabled for a while until another event takes place and you can re-enter the hotel. I've tried using a Global Conditional with no luck, but I'm probably miles off.

Any help would be appreciated and I'll print of some code if it is really needed.
Title: Re:Temporarily disabling hotspots.
Post by: Raggit on Tue 22/04/2003 00:26:08
Try this.

When you shoot the dude run the following script. (Remember, X simply stands for whatever number you choose to put there.)

SetGlobalInt(X,X);


Then when the player enters the map screen run this:

ifGetGlobalInt(X)==X)
DisableHotspot(X);

That should work. If you come up with any problems post 'em here in this thread and I'll see what I did wrong!
Title: Re:Temporarily disabling hotspots.
Post by: aussie on Tue 22/04/2003 09:14:01
You can also try and download AGS v2.55 beta. There is a new feature called regions, which I believe allows you to enable and disable parts of a room very easily.

Have a go anyway.  ::)
Title: Re:Temporarily disabling hotspots.
Post by: Tom on Tue 22/04/2003 10:29:23
The SetGlobalInt worked just fine. I presume that to reopen the hotel I just do the same again but use Enable Hotspot instead of disable.

I've just updated to the new Beta and the regions were much easier.

Thanks everyone. :)