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 can i make a door lock behind me?

Author
Message
Desecrated Studios
13
Years of Service
User Offline
Joined: 16th Jan 2011
Location: Kirtona
Posted: 4th Jul 2011 09:31
Does anyone have a scipt for this? I have tried to script it and... im just bad at scripting... If anyone can like either explain to me how i might do this, or if you have a script for this can you explain it to me?

Thanks!

-Josh
Website is under construction
System Specs: AMD Phenom x3 2.2GHz, 4GB DDR2 RAM, 1TB HD, HD Radeon 5770 1GB, 22in Acer Monitor
Norion
14
Years of Service
User Offline
Joined: 14th Jun 2010
Location: The Netherlands.
Posted: 4th Jul 2011 12:37
There should be a script like that in the fpsc guide.

BTW: this should be in de script board. And please search first and ask later.

Goodluck.


N.

sorry for my english i'm an alien
Darkfoil
18
Years of Service
User Offline
Joined: 7th Jan 2006
Location: Montanchez (Spain)
Posted: 12th Jul 2011 01:58
This is how I did it. Put a trigger zone directly in front of the door on the side you approach it from. Set the trigger zones main script to plrinzoneactivateused.fpi and its "If Used" to the name of the door. Then set the doors main script to the one I have attached. This script closes the door when the player is a set distance from it. Hope this helps.

Darkfoil.

Attachments

Login to view attachments
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 12th Jul 2011 02:41
You can also "alter" the door's main script to end after the "open and close" frames are completed. For example:



Using the above example, look at this line:

:state=3,frameatstart=0:state=10,setframe=0

This line will retirn the script back to the beginning (state=10) and waits until the player is at a certain distance within before continuing. you could change that state to something like this:

:state=3,frameatstart=0:state=15,setframe=0
:state=15:none

Basically, look at what the door script is doing, where it goes by each state, and where it loops back. Interrupt the loop and point it to "end".

- BlackFox

Login to post a reply

Server time is: 2024-11-24 06:35:16
Your offset time is: 2024-11-24 06:35:16