Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make a door lock when entering an area?
MissMarilynn Offline
Member

Posts: 77
Threads: 23
Joined: Oct 2011
Reputation: 1
#1
How to make a door lock when entering an area?

My script right now is:


void doorscare(string &in asParent, string &in asChild, int alState)

{

SetSwingDoorClosed("mansion_3", true, true);

PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);

PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);

GiveSanityDamage(5.0f, true);
}

What do I add to make the door lock as well?
Also, if a door is locked and a monster breaks it down you can get through it after its broken, right? What I want to do is lock the door behind the player, have them walk around the room and then have a monster spawn right outside the door.
(This post was last modified: 01-30-2012, 04:55 AM by MissMarilynn.)
01-30-2012, 04:51 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: How to make a door lock when entering an area?

http://wiki.frictionalgames.com/hpl2/amn...ions#doors

Tutorials: From Noob to Pro
01-30-2012, 05:21 AM
Website Find
MissMarilynn Offline
Member

Posts: 77
Threads: 23
Joined: Oct 2011
Reputation: 1
#3
RE: How to make a door lock when entering an area?

(01-30-2012, 05:21 AM)Your Computer Wrote: http://wiki.frictionalgames.com/hpl2/amn...ions#doors
So I would just add

SetSwingDoorLocked ("mansion_3", true, true); ???

Do I add anything to the function??
(This post was last modified: 01-30-2012, 05:48 AM by MissMarilynn.)
01-30-2012, 05:47 AM
Find
Shadowfied Offline
Senior Member

Posts: 261
Threads: 34
Joined: Jul 2010
Reputation: 5
#4
RE: How to make a door lock when entering an area?

(01-30-2012, 05:47 AM)MissMarilynn Wrote:
(01-30-2012, 05:21 AM)Your Computer Wrote: http://wiki.frictionalgames.com/hpl2/amn...ions#doors
So I would just add

SetSwingDoorLocked ("mansion_3", true, true); ???

Do I add anything to the function??
Adding that will make it locked. There's nothing more you need to add.

mansion_3 = name of door
true = locked (can also be false to make it unlocked)
true = effects (false or true, tbh I don't even know what the effects option is for...)

Current - Castle Darkuan
Other - F*cked Map
01-30-2012, 08:39 AM
Find




Users browsing this thread: 1 Guest(s)