Re: Keycard
Posted by satchmo on
Sun Jan 16th 2005 at 6:09pm
satchmo
member
2077 posts
1809 snarkmarks
Registered:
Nov 24th 2004
Occupation: pediatrician
Location: Los Angeles, U.S.
I know there is a way to make a key in the original Half-Life to access a certain door. How would I do this with HL2? Is there a specific entity designed for this purpose?
By the way, it's for a single-player map.
Re: Keycard
Posted by Dred_furst on
Sun Jan 16th 2005 at 6:41pm
455 posts
135 snarkmarks
Registered:
Sep 3rd 2003
Location: UK
Make a small model for the key, then make it a button...
Im not sure how to make the button, but I know you'll need a model for a good looking key :razz:
also try one of the prop_ enities
Re: Keycard
Posted by DrGlass on
Sun Jan 16th 2005 at 8:35pm
DrGlass
member
1825 posts
632 snarkmarks
Registered:
Dec 12th 2004
Occupation: 2D/3D digital artist
Location: USA
That is one way, the other way is....
make your locked door, name it <span style="color: orange;">Door1<span style="color: white;">
place your key, what ever it will be model or brush. Give it a name (if it is a brush make it a func_brush) <span style="color: orange;">Key1<span style="color: white;">.
Now make a box around the key and cover it with the trigger texture. Tie that brush to trigger_once.
Now make a logic_relay. Give it a name like Unlock_Door1. Set it to open Door1.
Last, make a func_button that will open the door once the player has the key.
So now, when the player "picks up" the key he will touch the trigger, set the output on the trigger to fire Unlock_Door1. Also have an output to kill Key1. You can make the the trigger play a sound too and display a text message if you want.
Now set the func_button to trigger Unlock_Door1
aswell. Doing this will make it so the door will only open if
both inputs have fired. i.e. once the key is picked up all the
player has to do is press the button and the door will open, but if
they dont have the key then the door will not open
</span></span></span></span>
Re: Keycard
Posted by satchmo on
Sun Jan 16th 2005 at 8:49pm
satchmo
member
2077 posts
1809 snarkmarks
Registered:
Nov 24th 2004
Occupation: pediatrician
Location: Los Angeles, U.S.
Thanks DrGlass. Sounds like a good plan. I'll implement it tonight.
Re: Keycard
Posted by DrGlass on
Mon Jan 17th 2005 at 3:10am
DrGlass
member
1825 posts
632 snarkmarks
Registered:
Dec 12th 2004
Occupation: 2D/3D digital artist
Location: USA
I made a tutorial, it should be posted soon. That way is MORE
complicated that it should be. check out my tutorial for an easy
breezy way to do it.
Re: Keycard
Posted by satchmo on
Mon Jan 17th 2005 at 3:19am
satchmo
member
2077 posts
1809 snarkmarks
Registered:
Nov 24th 2004
Occupation: pediatrician
Location: Los Angeles, U.S.
Thanks. That way a lot more people can benefit from it too.
You the man.
Re: Keycard
Posted by satchmo on
Mon Jan 17th 2005 at 5:28pm
satchmo
member
2077 posts
1809 snarkmarks
Registered:
Nov 24th 2004
Occupation: pediatrician
Location: Los Angeles, U.S.
I was dreaming how I could make a key some other way last night. I was actually sitting at my desk mapping in the dream! How geeky is that!
I dreamt that I could somehow modify a weapon model to make it a key. That way, I could carry it with me and switch to other weapons when I don't use it immediately. I'll make the key to have a combine soldier as the parent, and "wake" it upon the death of the soldier. Would that work?
Re: Keycard
Posted by Mantra on
Wed Mar 9th 2005 at 11:16am
Posted
2005-03-09 11:16am
3 posts
0 snarkmarks
Registered:
Jan 18th 2005
Occupation: na
Location: USA
<div class="abouttext">Message submitted 5 minutes after original post:</b></div>
I made a door that can only be opened by a certain keycard. It uses a keycard
which snaps into a slot via the phybox. When the keycard is in the slot the door is
then triggered and the keycard is pushed out to use again. U can carry this keycard
and use it over and over. The door cant be opened any other way except for the
button on the inside of the room. Good for a secret area u dont want others to get into.