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 a door close and lock behind me?

Author
Message
Werecool
12
Years of Service
User Offline
Joined: 8th Jun 2012
Location: The dark depths of oblivion aka my room.
Posted: 9th Jun 2012 04:46
Hello, I am working on a survival horror game and at one point you get to a room where you fight the first boss and the door closes behind you. The problem is, I have found scripts to get a door to close behind you, but how would I make a script that has the door close behind you and lock itself so you cannot escape?

The door then needs to unlock itself once the boss has been killed.

I hope someone could provide me a script for this or give me instruction on how to make one.

Thank you.

We give so much, yet we are given so little.
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 9th Jun 2012 20:08 Edited at: 9th Jun 2012 20:09
Welcome to FPSC and the forums.

This is doable. Unfortunately I don't have the time right now. However, if you don't get an answer in the next day or so -- which I'm sure you will -- I'll be back.

"A programmer is just a tool which converts caffeine into code . . . reminds me….. if I had one more brain cell, I could have a synapse! woo hoo, Sparky!

~I'm the Terry of the Flatlands.
mickeyb
18
Years of Service
User Offline
Joined: 1st Jan 2006
Location:
Posted: 9th Jun 2012 20:27
@ Werecool

There are a couple of scripts in the Ocfps Guide which you will find in your Docs folder.
That might help you
Destroy object - lock door page 76

Shoot enemies to open door page 89
Runihadacow
12
Years of Service
User Offline
Joined: 17th May 2012
Location:
Posted: 9th Jun 2012 20:34
I would just make the door a locked door with a remote trigger. This will allow to open the door once the boss has died.
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 9th Jun 2012 20:37
Or, if you understand variables, you can set a variable when the "enemy" is killed and then that variable is checked when you attempt to open the door (the door script would check the variable). If the variable is at the set value, the door opens.

Many different ways to do it.


Twitter: @NFoxMedia

Login to post a reply

Server time is: 2024-11-24 00:28:41
Your offset time is: 2024-11-24 00:28:41