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 / Make a Control Room Door(Auto) into a Control Room Door(Fake) when player steps on trigger zone

Author
Message
Tom0001
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location:
Posted: 24th Apr 2006 23:10
The topic is my question. This might not be a script, but does anyone know how I can achieve this?

Tom

Support your local Riker 9 Chapter.
DaReDeViL
18
Years of Service
User Offline
Joined: 17th Mar 2006
Location:
Posted: 24th Apr 2006 23:26
hey tom,
im not that good of a scripter, but for sure it has to be. The script would involve maybe turning the entity (the door) to static.
sorry i cant answer
hope it helps
randbo
18
Years of Service
User Offline
Joined: 10th Apr 2006
Location:
Posted: 24th Apr 2006 23:37 Edited at: 25th Apr 2006 01:17
well you cannot change the door ingame but you can deactivate it.

you need to alter the door script to add activated=1 lines

like adding the following:

:state=11,plrdistfurther=150,activated=1:state=0,activate=0
:activated=1:state=11,sound=put something interesting here,activate=0


the autodoor will hang on state 11 unless you put something in there that brings it back to state 0. like a switch that is like 200 units away.
naturally,both the switch and the trigger zone call the same elevator.
Tom0001
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location:
Posted: 25th Apr 2006 00:15
Ok so basically I just need the door to work, then when the player has stepped through it, stop working from then on. I knwo you just gave me that quite detailed, but I still don't understand it. Can someone give me an exact script and explain in what way to apply it to what entity. Basically what I want is:

-Player steps through door onto a trigger zone
-Trigger zone stops door from working from then on
Can someone please help me out here?

Tom

Support your local Riker 9 Chapter.
randbo
18
Years of Service
User Offline
Joined: 10th Apr 2006
Location:
Posted: 25th Apr 2006 00:22
hold on, there is more, im almost done testing it
Tom0001
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location:
Posted: 25th Apr 2006 00:42
Ok, thanks for taking the time to test it out and see if you can get it working.

Tom

Support your local Riker 9 Chapter.
randbo
18
Years of Service
User Offline
Joined: 10th Apr 2006
Location:
Posted: 25th Apr 2006 00:52 Edited at: 25th Apr 2006 01:03
ok i got it working.
now first of all for Tom0001 and his one shot permanent shut the door, do the following:
1. open autodoor.fpi in the scriptbank directory using notepad.
2. save the file as autodoor1.fpi
3. edit this file by adding the following line AFTER the last state=3 line

:activated=1:state=11,activate=0

4. save the file, its autodoor1.fpi now, remember?

next you need to edit the door itself by doing the following:
1. go into entity editing mode and select the door.
2. RENAME THE DOOR in the General Name block, like DoorSlam.
3. change the script in the AI Scripts Main block to autodoor1.fpi

next you need to edit the triggerzone script:
1. open plrinzone.fpi script in the scriptbank directory
2. save as plrinzone1.fpi
3. edit the script by changing activateallinzone=1 to activateifused=1
4. save the file, its plrinzone1.fpi now

next you need to edit the triggerzone itself:
1. go into entity editing mode and select the trigger zone.
2. change the script in the AI Scripts Main block to plrinzone1.fpi
3. change the AI Scripts If Used block to the name of your door, in this case, DoorSlam.

last, AND MOST IMPORTANT, you need to put the trigger zone at least a full block away from the door. it seems that the player has a big triggering zone around him and if you put the trigger zone next to the door, you will trigger the slam before you go thru the autodoor.
you will need to fool around with triggerzone placement.

the triggerzone is a ONE SHOT use item, btw, and the door will stay shut forever.
randbo
18
Years of Service
User Offline
Joined: 10th Apr 2006
Location:
Posted: 25th Apr 2006 01:16
now for others who want a door that can be reopened:

1. add the following 2 lines to autodoor.fpi after the last state=3 line

:state=11,plrdistfurther=150,activated=1:state=0,activate=0
:activated=1:state=11,activate=0

2. save the script as autodoor1.fpi

next rename the door in question to something like DoorSlam and change the main script to autodoor1.fpi

change the plrinzone.fpi script by replacing activateallinzone=1 with activateifused=1 and save it as plrinzone1.fpi

next edit the triggerzone by changing the main script to plrinzone1.fpi and change the If Used block to DoorSlam, your named door.

finally, add a switch and select the AI Automated If Used block as DoorSlam, your named door again.

ok placement:
make sure the switch is at least 2 blocks away from the door.
make sure the triggerzone is at least 2 blocks away from the door.

thats it! and it all works. i tested it.
Tom0001
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location:
Posted: 25th Apr 2006 01:23
Strange, my door ended up staying open forever. Maybe it's because it was an autodoor, thus it was still open when I stepped into the triggerzone. Hmm...

Tom

Support your local Riker 9 Chapter.
randbo
18
Years of Service
User Offline
Joined: 10th Apr 2006
Location:
Posted: 25th Apr 2006 01:27
move the triggerzone, your triggerzone was too close and it stopped the door in open mode.
the door script only did half of what it does, it opened the door, but you were still too close to the door for it to close before your triggerzone hit.

i used the EXACT SAME DOOR you did and it works.
Tom0001
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location:
Posted: 25th Apr 2006 01:28
Yes I tried moving it and it worked fine. Thanks for all the help.

Tom

Support your local Riker 9 Chapter.
randbo
18
Years of Service
User Offline
Joined: 10th Apr 2006
Location:
Posted: 25th Apr 2006 01:32
yw.
hmm, mebbe someday we can edit the playerzone. its kind of large.
things trigger early because of it.
Les Horribres
18
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 25th Apr 2006 02:19 Edited at: 25th Apr 2006 02:19
playerzone? que esta?

a simpler correction would be to edit the script... after the animation is over lock the door...
I am still trying to figure out why you want to put the activated=1 after the state=3... won't make much of a difference, perhaps you could enlighten me.

:state=0,anywithin=75:state=1,setframe=0,sound=$0
:state=1:incframe=0
:state=1,frameatend=0:state=2,coloff
:state=2,anyfurther=80:state=3,sound=$1,colon
:state=3:decframe=0
:state=3,frameatstart=0,activated=1:state=11
:state=3,frameatstart=0:state=0,setframe=0

We all have our inner noob. Join the NJL, and have more fun!
I believe society is flawed; our notions on life, on child rearing, stem too far back to be of relevance in this day and time.
randbo
18
Years of Service
User Offline
Joined: 10th Apr 2006
Location:
Posted: 25th Apr 2006 06:24
well activated=1 at the front will be sensed whatever state you are in.
it will take you to state 11 and sit there, which freezes the door shut.
then in the switch version there is another line
:state=11,plrdistfurther and so on that resets the state to 0 and turns on the door again.
it does work.

the key is activated=1 is BY ITSELF as a condition. it will be sensed during any pass thru the loop.
in your code, you will miss the lockup if the door is sitting in state=0
Les Horribres
18
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 26th Apr 2006 00:28
I know that activated is a condition, just as :: is a null condition :p, but what I was trying to say is that the placement won't matter if it is as open ended as that.

the line ":state=3:decframe=0" needs to repeat several times before the door is fully closed, I think this is where you got confused... and that is all I am trying to convey. Even though you place it at the end, the final condition was not met as 'true'. (meaning the door was shut)

Now remove the frameatstart=0 and see what happens...

We all have our inner noob. Join the NJL, and have more fun!
I believe society is flawed; our notions on life, on child rearing, stem too far back to be of relevance in this day and time.

Login to post a reply

Server time is: 2024-05-17 09:53:37
Your offset time is: 2024-05-17 09:53:37