Okay, here's the thing: I have a room with a hotspot, you press it once and an object appears. What I need is to make the object disappear once you press the same hotspot again. Basically I need an on/off switch. Easy, isn't it? Well, no. I think I've tried everything and nothing. Can somebody tell me an easy way? As usual, asume that you are talking with an idiot without the slightest idea of programming.
// script for hotspot: Interact with hotspot
if (IsObjectOn(THEOBJECTNUMBER)) ObjectOff(THEOBJECTNUMBER);
else ObjectOn(THEOBJECTNUMBER);
Ha! It worked! Well, if I'm going to make stoopid newbie questions, I may as well go along with it.
Um... a way to make the same making the object on and off AND a different spot being enabled and disabled with it?
// script for hotspot: Interact with hotspot
if (IsObjectOn(THEOBJECTNUMBER)) {
ObjectOff(THEOBJECTNUMBER);
DisableHotspot(THEHOTSPOTNUMBER);
}
else {
ObjectOn(THEOBJECTNUMBER);
EnableHotspot(THEHOTSPOTNUMBER);
}
Thanks a bunch. I owe you one.
You're welcome. :)