Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: miguel on Wed 07/05/2003 01:16:39

Title: disable regions?
Post by: miguel on Wed 07/05/2003 01:16:39
hello to all,
in this room I´m working on I have a character walking to a place when the main character steps onto a region.
all works well, but I want it to just happen once.
is that possible?
can we still use stand over hotspot?
thanks
Title: Re:disable regions?
Post by: on Wed 07/05/2003 21:55:38
Ok, My first time of giving advice.

What you want to do is disable a hotspot, correct?
you can either do the code (I'm no good at coding)
Or, you could add the function
"Room-Disable Hotspot" and have that in whichever section in the Interactions Editor (Ie: "When player stands on hotspot", "looks at", ect)  after whatever you have happen first...    

Hope that helps.   As I said, my first try at helping.
Second post too.
Title: Re:disable regions?
Post by: miguel on Wed 07/05/2003 23:48:11
thanks, but on the newer versions, "player stands on hotspot" became absolete
      or didn´t?
Title: Re:disable regions?
Post by: on Thu 08/05/2003 01:01:47
Yeah, I think youre right.   I just read about the newer version (I have version 5.54.)  Sorry about that.  

And I'm not sure.  In my version, it still has "Player stands on hotspot", But I think there should still be the
"Room-Disable Hotspot (Code> DisableHotspot (hotspot#)" and
"Room-Enable Hotspot (Code> EnableHotspot (hotspot#)"

As I said, I've got 5.54, and the newest one (In the Technical Fourn, I think) is something like "v2.55 beta 4" or something.

So, hope this is  helps.

Oh, and what you are looking for will probably be in the help/manual thing.
Title: Re:disable regions?
Post by: ThunderStorm on Thu 08/05/2003 16:06:58
You can set a global int (for example global int 10) to 1 somewhere in your script and check if it has been set before running the script:

if (GetGlobalInt(10) < 1){

// your code

SetGlobalInt(10,1); }

That should make your code execute only once.
Title: Re:disable regions?
Post by: miguel on Thu 08/05/2003 16:33:15
thanks guys, I'll use the variables, I should have tought about it before