Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 12 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Tutorials

»
SOF2 Mapping
ratings:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
Lock-pick and Key-card
Versions: You must be logged in to view history.
This tutorial will explain how to open doors using a lock-pick, or a key-card.

LOCK-PICK AND KEY-CARD

By baltic.forever


This tutorial will explain how to open doors using a lock-pick, or a key-card.
First, it might be helpful if you download the map that this tutorial is based on, and have it loaded into the editor. This map already includes the two doors for this tutorial, but they will still need a little setting up.

You can download it HERE then just unzip it into you're SoF2 "base" folder.


Ok, lets start with the lock pick.

1. Create a brush 16 units (grid units) square by 8 units thick and give it the "tools/trigger" texture.

2. Make sure the brush is flush with the door handle (click here for picture).

3. Right click in the 2d window, and select "trigger_toolbox".

4. Press "N" on the keyboard to bring up the entity editor, and enter the following "key/value" pairs.

key target
value door1


key holdtime
value 5 //{time in seconds to open the door}


key icon
value hud/lock_pick //{this is the icon that is displayed on the screen}


key actAngle //{make sure you use CAPITAL letters where shown}
value 0 0 0 //{actAngle values will be explained later}


//{these next three settings create the sound effects}

key startSound
value sound/misc/lockpick/pick_start


key loopSound
value sound/misc/lockpick/pick_loop


key endSound
value sound/misc/lockpick/pick_done


You will also need to make sure that the "directed" and "once_only" spawnflag boxes are selected.

6. Highlight the door and the origin brushes and press "N" and enter the following "key/value" pair.


key targetname
value door1


You will also need to make sure that the "locked" box is selected. You could also select the "usable" "smart" and "auto_close" boxes if you wanted to.
You should now have a door that will open after 5 seconds, by picking the lock.


Q. What does actAngle and 0 0 0 do?

A. The actAngle key simply forces the player to be facing in a certain direction, before the trigger can be used.

The "value" 0 0 0 means that the player has to be facing East (in the 2d window) to use the trigger. North is 0 90 0, West is 0 180 0 and South is 0 270 0.





Now onto the key-card.

There is a bit more work involved with this part of the tutorial, so lets get started.
First, move to the table inside the building.


1. Create a brush, 16 x 8 x 8 units.

2. Click on "curve" at the top of the editor, then click on "simple patch mesh", then "OK".

3. Press "shift+S" to open up the "patch inspector".

4. In the textures box at the top enter "textures/common/keycard" and press the "return or enter" key on you're keyboard, if the texture looks ok then click on "done".

If the texture is facing the wrong way or not aligned with the patch, then use the patch inspector's arrow keys until the texture fits, before you click on "done". {If you still cant get the texture to line up correctly, then just make a normal brush 16 x 8 x 1 unit and place the "textures/common/keycard" texture on it. You can then change the texture of the four sides to make it look more natural}.

5. Place the patch mesh flush with the top of the table (click here for picture).
{The texture may seem to disappear and reappear, but this is normal and will show up ok in the game}.

6. While the key-card is still highlighted, right click in the 2d window and select "func_wall"

7. Press "N", and enter the following;

key targetname
value card1


That takes care of the card, now onto the trigger.


1. Create a brush in front of the key-card and place the "tools/trigger" texture on it

2. Right click in the 2d window, and select "trigger_multiple".

3. Press "N" on the keyboard, and enter the following.

key target
value card1


4. Select the following spawnflag boxes

once_only
player_use
player_only


Now that we have the key-card set up, we will need something to use it on.

Move over to the card-scanner next to the steel door and do the following

1. Create another "trigger_multiple" brush that is the same size (roughly) as the scanner, and place the brush just in front of it.

2. Press "N" on the keyboard, and enter the following;


key targetname
value door_trig1

key target
value door2

3. Select the following spawnflag boxes

player_use
inactive //{trigger cant be used until activated}
player_only



We now need a way to activate the trigger once the key-card has been picked up. For this we need a "target_activate".


1. Right click on the 2d window, and select "target_activate" and position it somewhere near the trigger brush.

2. Press "N" on the keyboard, and enter the following;


key targetname
value card1

key target
value door_trig1


Finally, we need to connect the trigger to the door.

1. Select the door brush and press "N" on the keyboard.

2. Enter the following

key targetname
value door2


That's it. Compile the map and try it out.

If you have any problems with this tutorial, then you can also download the completed map HERE.

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»