Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / How do I make 1 trigger zone destroy a previous trigger zone?

Author
Message
bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 21st Aug 2010 02:56
In my level, I have an air lock. To open the first door, I use a keypad to activate it. When I move to the next door, a trigger zone closes the door behind me, then I use another keypad to open the 2nd door. When I go through the 2nd door another trigger zone closes it behind me. How do I make a 3rd trigger zone destroy the previous 2 trigger zones, so that I can go back through the air lock and do the same in reverse? Thanks in advance!

I game therefore I am.
Nbt
15
Years of Service
User Offline
Joined: 11th Oct 2009
Location: Behind you!!
Posted: 21st Aug 2010 05:27
Why not just use the doors script to do it?? if the player is within 20 of the door it opens, if the player is further than 50 from the door it closes etc. Use that for each door and you can't have both open at the same time. As when you approach the next door, your far from the last door which closes.

bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 21st Aug 2010 06:14
Will that work in the reverse direction as well?

I game therefore I am.
Nbt
15
Years of Service
User Offline
Joined: 11th Oct 2009
Location: Behind you!!
Posted: 21st Aug 2010 14:47
Quote: "Will that work in the reverse direction as well?"


Can't see why not, both doors are independent of the other, so it really does not matter which way yo enter or leave, they will open on your keypad (or player proximity) and close when the player is far enough away. So it works both ways.

bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 21st Aug 2010 14:50
Thanks, I'm off to get my head around door scripts (this could take a while lol)

I game therefore I am.
bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 21st Aug 2010 15:34
I've had a go at writing a new airlock door script, but I'm not sure if I got it right, I've attached the .fpi file, do you think it will work?

I game therefore I am.

Attachments

Login to view attachments
Nbt
15
Years of Service
User Offline
Joined: 11th Oct 2009
Location: Behind you!!
Posted: 21st Aug 2010 16:08 Edited at: 21st Aug 2010 16:10
Here are two scripts that do the same thing different ways. One you use as the door script and will work with any switch/keypad etc like a normal remote door.

The other you use as the switches script and use with a normal remote door. This is mainly for those flipflop switches with the locked/open textures, as the door script one does not reset the switch to locked when the player moves away. This one does.

As the scripts close the doors depending how far away the player is, place your switch/keypad on the door frame (or next to it) to make it work right.

These are to different ways to do it, do not use both scripts at the same time, or you will get door flapping city lol

Airlock script for remote door:



Airlock script for on off switch:



Of course place a switch either side of each door and give both the same door to operate. It does not matter how many doors you have, 1/2/3/4....

bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 21st Aug 2010 16:16
Thanks Nbt, I tried mine and it didn't work. I'll try yours and if it works, I'll compare yours with mine to see exactly why mine didn't work. This way, hopefully, I'll learn something, instead of just blindly using yours without a clue about how it works

I game therefore I am.
Nbt
15
Years of Service
User Offline
Joined: 11th Oct 2009
Location: Behind you!!
Posted: 21st Aug 2010 16:48
You have the perfect attitude Brucie me old mate, a great way to learn scripting with one small flaw

I can't script for toffee, so learning from anything I do will only make you worse :p

bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 21st Aug 2010 17:18
Ok, finally after lots of hairpulling and stupid dumnass mistakes, I got it working lol. I used your airlock switch script, with the stock doorremote script. Thanks for your help with this, I really appreciate it

I game therefore I am.
Nbt
15
Years of Service
User Offline
Joined: 11th Oct 2009
Location: Behind you!!
Posted: 21st Aug 2010 17:23
np - I never mind helping people who are prepared to help themselves

Login to post a reply

Server time is: 2024-11-24 19:45:06
Your offset time is: 2024-11-24 19:45:06