Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Nostrum on Thu 17/07/2003 22:12:32

Title: disabling hotspots
Post by: Nostrum on Thu 17/07/2003 22:12:32
I've got a hotspot I want to disable and I have the game run this script:

DisableHotspot (6);

and for some reason the hotspot is still active. Got any help?
Title: Re:disabling hotspots
Post by: Scummbuddy on Thu 17/07/2003 23:21:22
try putting a wait(1); right after that code.

dont forget needed braces.
Title: Re:disabling hotspots
Post by: Nostrum on Fri 18/07/2003 18:43:18
Hm.. can you can explain to me how that would help?
Title: Re:disabling hotspots
Post by: Scummbuddy on Fri 18/07/2003 19:15:02
if you give the engine a second to redraw the scene, i believe it will cause the hotspot to deactivate, or reactivate.

this is from my memory, but i could be wrong
Title: Re:disabling hotspots
Post by: Nostrum on Fri 18/07/2003 23:58:59
Nope, no luck. I put in "wait(40);" (40 equals a second) and still the hotspot doesn't disable. If anyone else has got any help, feel free to post. It's really perplexing to me that just "DisableHotspot (3);" isn't working...
Title: Re:disabling hotspots
Post by: jetxl on Sat 19/07/2003 00:07:25
disablehotspot works on my computer.
Try testing it.

player walks on hotspot 3
disablehotspot(3);

maybe there is a problem somewere else
Title: Re:disabling hotspots
Post by: Minimi on Sat 19/07/2003 00:08:23
you could try this... although I never tried it
before you go copy this, read it over, because im pretty sure i make some mistakes in writing this!

int hotspot_three = 0;


if (hotspot_three == 1);
disablehotspot (3);
}

if (hotspot_three == 2);
enablehotspot (3);
}



so now you only have to set the code when you want to

int hotspot_three = 1;


I really hope this will help!