Temporarily disabling hotspots.

Started by Tom, Tue 22/04/2003 00:16:30

Previous topic - Next topic

Tom

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.
I'm so happy I could shit!

Raggit

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!
--- BARACK OBAMA '08 ---
www.barackobama.com

aussie

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.  ::)
It's not the size of the dog in the fight. It's the size of the fight in the dog.

http://www.freewebs.com/aussiesoft/

Tom

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. :)
I'm so happy I could shit!

SMF spam blocked by CleanTalk