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 / Trigger Zone - Close and Lock an Open Door

Author
Message
Talairina
18
Years of Service
User Offline
Joined: 9th Jan 2006
Location: United Kingdom
Posted: 15th May 2006 04:43
Aim: Player open's a remote door with a switch (named decon_switch1).
Player enter's through door (decon_door1) and step's on to a trigger zone (decon_close1). Trigger zone close's decon_door1 and lock's it again.

Iv tried seting up the trigger zone to both use the remote door and the switch to lock the door. When I step on the trigger zone I hear the locking nosie but the door is wide open.

What I need is to figure out how to close the door then lock it. It simply won't close.

I hope someone can point the error in what Im doing as it's annoying me no end.

Tal
Tom0001
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location:
Posted: 15th May 2006 17:35
Maybe try searching before posting this? Don't say you have searched because you obviously haven't. Simply searching for door or lock will bring you to the thread I made on this kind of thing, which was answered and worked very well.

Tom

Talairina
18
Years of Service
User Offline
Joined: 9th Jan 2006
Location: United Kingdom
Posted: 15th May 2006 20:48
Tom I did try searching and your method is not the one Im seeking. your method work's but it won't work with the multiple switchs structure I need. So don't rant at me when I did acually search and find your post.
Tom0001
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location:
Posted: 15th May 2006 23:12
Set the trigger zone's AIMain to plrinzoneactivateifused.fpi then set the IfUsed field of the trigger Zone to decon_switch1

Tom

Talairina
18
Years of Service
User Offline
Joined: 9th Jan 2006
Location: United Kingdom
Posted: 16th May 2006 04:56
Tried that. Failed. Either my default script's are borked *would not surprize me* or it simply does not want to work. What you said should work, it's perfect logical sense and the script's do excatly what they should, it just wont do it.

Tal
Tom0001
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location:
Posted: 16th May 2006 18:39
The Trigger zone should be about two or three squares away from the door.

Tom

uman
Retired Moderator
19
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 16th May 2006 21:24
Talairina,

You should have backups of your scripts and I guess you did not make them at any time.

Reinstalling FPSC should put them back. Though I dont advise that if it will mess up your current installation. Before you ever re-install I would recommend backing up whats current.

Default trigger zones and scripts can be finickey in FPSC - they dont always work correctly in all situations.

Some scripts for switches and doors activate only once - so they dont reset themselves.

Door1 script I believe opens once on player proximity - then closes and locks so if theres no other way I guess you may have to make a copy of it and change the player proximity part so that it opens with a switch instead then closes automatically and stays shut as it does now. That way you would possibly not need a trigger zone to close it. I guess you could use a part of the remote door script to insert into the script to open it with your switch.

i.e. Whats needed is a combination of code from the two scripts. No trigger zone should then be necessary.

Talairina
18
Years of Service
User Offline
Joined: 9th Jan 2006
Location: United Kingdom
Posted: 17th May 2006 02:53
I have indeed got backups of the script's and Im running from those. I believe i could edit the door1 script and do such a thing, thank you Uman for the idea. Thanks tom also for your help.

Ill post the script in this thread when it's completed for everyone else that may or may not need it.

Tal
Talairina
18
Years of Service
User Offline
Joined: 9th Jan 2006
Location: United Kingdom
Posted: 17th May 2006 03:57
Double Post with script.

Quote: "
;Artificial Intelligence Script
;Written by Tal

;Header

desc = Remote Controlled Door (Open and Timer Close)

;Triggers

:state=0,activated=1:state=1,setframe=0,sound=$0
:state=1:incframe=0,timerstart
:state=1,frameatend=0:state=2,coloff
:state=2,timergreater=4000:state=3,sound=$1,colon
:state=3:decframe=0
:state=3,frameatstart=0:state=0,setframe=0,activate=0

;End of Script"


This basicly opens the door via a switch and starts a timer before thd door closes again. You reactivate the timer by simply switching on the switch again. No Zones needed. Attach this script to the remote door and name teh switch/door as your normally would.

Tal

Login to post a reply

Server time is: 2024-05-07 05:56:32
Your offset time is: 2024-05-07 05:56:32