Page 1 of 1

Scripting question...

Posted: Tue Sep 17, 2002 5:41 am
by Ed the Monkey
I have a big scripting problem and I'll probabbly have more, but i'll deal with this one first. I want to know how to attach an object to a door, as in, when the object is broken the door can no longer close, it becomes locked open and until it is broken the door remains locked closed.
The object is built like any other breakable object, much like breakable terminals or generators. any ideas?

Posted: Tue Sep 17, 2002 7:01 am
by Section8
Okay, set the door up as being permanently locked, with an impossible (0) difficulty, and set up a trigger to toggle the OSS (Object Script State) of the door when the breakable is destroyed. I think that ought to do it.

Posted: Tue Sep 17, 2002 8:16 am
by Jimmyjay86
Why doesn't the OSS work to relock the door?

Posted: Tue Sep 17, 2002 10:21 am
by OnTheBounce
Jimmyjay86 wrote:Why doesn't the OSS work to relock the door?
There's a "Lock/Unlock Door" trigger to do that.

BTW, you can lock doors in the open position. Basically the OSS can't be changed when a door is locked, regardless of whether or not it is closed.

OTB

Posted: Tue Sep 17, 2002 3:53 pm
by Ed the Monkey
ok.... I had everything up to the OSS. What I don't understand is how to tie a variable to the distruction of an object...

Posted: Wed Sep 18, 2002 6:48 am
by OnTheBounce
Ed the Monkey wrote:ok.... I had everything up to the OSS. What I don't understand is how to tie a variable to the distruction of an object...
Use a "Quantity Unit" trigger. The object will have to have a Tag Name, of course. You can then set up the trigger w/the condition either being "has 0% hp" or "less than 1/exactly 0 alive at anywhere". When the condition is fulfilled, you simply have the Action be to change the variable to whatever value you want it to be.

A word of advise: Be very, very, VERY careful w/variable values as more than a few bloody clumps of hair - mine included! - have ended up strewn on the floor thanks to a simply typo in one of these fields. Endocore uses numerical values for his, and simply keeps track of what each value is supposed to represent on scratch paper. You might give that a try.

Cheers,

OTB

Posted: Wed Sep 18, 2002 4:59 pm
by Ed the Monkey
AHHHH ok! now i understand. Thanx