lophyte@Posted: Mon Aug 09, 2004 4:19 am :
CUSTOM PDAS PART 2: SECURITY CLEARANCE DOORS
By: lophyte <lophyteNO@SPAMgmail.com>


This tutorial assumes that you've read BNA's Hallway and Door tutorial, and Custom PDAs part 1. The map I used for this was actually BNA's tutorial map, so have that handy.


1. SETTING UP THE PDA AND DOOR

Starting with that map, add two PDAs as detailed in part 1, with all of the same details. This time, in the custom PDA's entity properties, change "inv_name" to "Area2_PDA". Also, select the door, and in the entity properties, add key "locked" and value "2". Note the name key of the door -- it'll be something like func_door_1.

Image


2. CREATING THE PANEL

Deselect the PDA. Now we're going to create the panel that you click on to check your security clearance. Right click on the grid, and go to func, then func_static. This will create a standard box brush. Go into the entity properties and click the "Model..." button which brings up the model window. Browse through the model tree to base/models/mapobjects/guiobjects/techdrpanel1/techdrpanel1.lwo and click OK.

A common bug in Radiant is that the shape of the entity on the grid doesn't change to the model when you select a new one. This can be fixed by cloning the entity with the spacebar, then deleting the old one. Now you have your panel -- rotate it and line it up against the wall. It should be about 64 units off the ground.

Now, back in the entity properties, click on the "Gui..." button and browse through the gui tree to base/guis/doors/pda_door.gui and click OK. This is the part where we add data to the panel. Clear the text in the Key textbox, and type "gui_parm1", then clear the text in the Val textbox, and type "Area 2". Whatever value you give gui_parm1 will show up on the panel as the area you're trying to access. The next few keys, gui_parm2 to gui_parm5, are a list of names who's PDAs can access this area. We only have one PDA, so we'll set gui_parm2 to "Joe Schmoe".

This is the important part: gui_parm7. This is how the panel checks if you're authorized or not. Set the gui_parm7 key to "Area2_PDA", matching the inv_name value we gave to the PDA earlier.

Image


3. UNLOCKING THE DOOR


It's now time to make the panel unlock the door. Click on the grid and hit escape to make sure nothing's selected. Right click on the grid and go to trigger, then trigger_once. Note the name of the trigger in the entity properties window -- it should be something like trigger_once_1. Now, add a "target" key to the properties, and set the value to the name of the door you're unlocking.

Unselect the trigger, and select the panel. Go into the entity properties and add a "target" key for the panel as well, and set the value to the name of the trigger. On the grid, the panel should have a line connecting it to the trigger, and the trigger should have a line connecting it to the door.

Image

And that's it! Fire up Doom and give your map a try. Also, if you want the "Security Clearance Updated" message to show up when you pick up Joe Schmoe's PDA, edit the PDA file we created in part 1, in newpdas/test_schmoe.pda, and change the security line to whatever you like.


Well, that's all for now. Comments, suggestions and feedback is welcome and appreciated.


- lophyte



Vash@Posted: Mon Aug 09, 2004 6:34 am :
Great tutorial.



just1n@Posted: Mon Aug 09, 2004 8:35 pm :
Nice tutorial.



3xodus@Posted: Wed Aug 11, 2004 11:17 pm :
I have one problem. The door opens even if the person doesn't have the pda. How can I stop this? Also, when I pick up the PDA in game, all it says is "Default PDA" even though it's been configured in game



lophyte@Posted: Thu Aug 12, 2004 12:28 am :
Make sure that you set a "locked" key on the door - it should have a val of 2. Also, make sure that the following bolded names match:

In the entity properties for the PDA, the key "pda_name" should have a val of "test_schmoe"

In the PDA file, the first block should look something like:
pda test_schmoe {
name "Joe Schmoe"
etc, etc...
}

Also, make sure the PDA file is called test_schmoe.pda and its in your doom3/base/newpdas folder.



CodeMonkey@Posted: Thu Aug 12, 2004 6:34 pm :
Nicely done. Even a mapping-challenged coder like me can follow it :)



RSLink@Posted: Wed Aug 25, 2004 7:21 pm :
Thx alot, did work fine.
I just see 1 error in the tutorial. If you set a trigger_once the door will unlock if you touch the trigger_once and/or if you use the panel. Just connect the panel with the doors (fun_door). The trigger_once is incorrect in this place. You will only be able to press the panel one time (with this gui).



DCBKNC1701@Posted: Thu Aug 26, 2004 4:16 pm :
I just discovered something that might be helpful.In order to have the player start off with a PDA (as in no 'stop in at reception desk message') all you have to do is:

Create an item_pda,then give it a 'pda_name' of 'personal' (or if you used a custom one) then,all you have to do,is give it a key of 'inv_carry' and a value of '1'.This will make the player already have it when the level starts.I hope i helped some people,i know i was trying to figure this out myself :D:wink:



goliathvt@Posted: Thu Aug 26, 2004 6:17 pm :
Nice DCBKNC1701... I sat there trying to use target_give and all kinds of other sh!t... rofl... the answer was right in front of me the whole time.... ;)

Thanks!

G



jon-driverdown@Posted: Sun Aug 29, 2004 11:39 am :
very nice find. i was placing the pda next to the start. meh.

anyone know how to make the PDA not give the intro screen with the click to continue that takes about 14 days to appear?



DCBKNC1701@Posted: Sun Aug 29, 2004 2:12 pm :
If you did it right,that shouldnt appear,itll be like the player already had the PDA when the level started



goliathvt@Posted: Sun Aug 29, 2004 5:25 pm :
Hey. I can't get this to work... can you post an example map or go into more detail about what you're doing to get the PDA in the user's inventory?

G



goliathvt@Posted: Sun Aug 29, 2004 5:55 pm :
Nevermind, I got it. What is written above is incorrect:

To give a PDA to a player when the level begins, simply set the PDA item as a target in your info_player_start entity.

That's all that's needed.

Edit: Figured I'd add some more detail to this:

Note: I'm using +set fs_game someModDirectory, so creating a custom personal PDA for me does not overwrite the vanilla game's personal PDA....

To get this to work, I created a custom personal.pda and placed it in someModDirectory/newpdas.

personal.pda
Code:
// NO audio files in the personal pda and subsequently no video files in other pdas
// all vidoes are downloaded to your personal pda and individual pdas can contain
// audio logs

pda personal
{
   name      "^5TT Personal^0"
   fullname   "TT User"
   icon      "gui/pda/bio1"
   id         "3819x-22"
   post      "Mars"            // for the personal pda this is ignored
   title      "Marine Security"   // this is used for title or rank ( for the player )
   security   "Marine HQ"         // only set this if it contains a new security clearance.. as far as the pda and hud goes this is informational only
   pda_email   "tt_personal"
   //pda_video   "marine_sop"
}

email tt_personal
{
   date      "08-22-2004"
   to         "Trigger Tutorial Users"
   from      "SJR"
   subject      "Welcome!"
   text
   {
   "Welcome to GoliathVT's Trigger Tutorial.\n\n"
   "Visit each GUI station for information on the various trigger types used in the map.\n\n"
   "\n"
   "Enjoy the tutorial\n\n"
   "SJR\n\n"
   }
}


Now, here are the entities used and their various properties:

The Player Start Point
classname: info_player_start
name: info_player_start_1
angle: 0
target: personal_pda

The PDA
inv_name: personal
classname: item_pda
name: personal_pda
inv_item: 1

===

That's it.

G



DCBKNC1701@Posted: Sun Aug 29, 2004 6:09 pm :
It isnt incorrect,its just another way of doing it,cause it works too



goliathvt@Posted: Sun Aug 29, 2004 6:11 pm :
Can you post a map using your method, because it didn't work for me.

G



DCBKNC1701@Posted: Sun Aug 29, 2004 6:41 pm :
OMG youre right!!Its because i had the PDA spawn where the player spawns,it must have the player pick it up as the level is loading! :oops:



goliathvt@Posted: Sun Aug 29, 2004 7:23 pm :
No worries. :) I'm just glad it was figured out... esp. since that little info window sticks around so long after you pick up the first PDA... its very annoying.

G



maddios@Posted: Sat Jan 21, 2006 10:36 pm :
Im having trouble with the gui_parms. First, when I type in the key/val they wont show up in that little window with all of the key/vals.

At first, i thought this was just a defect in editor.
But then when I loaded the map, nothing appeared on the gui, just the pda scan icon(the area name and the list of names were missing), and when I scaned my pda with the right security clearance, it
would saqy 'Incorrect Security Clearance'.



maddios@Posted: Sun Jan 22, 2006 1:55 am :
please someone help?



rich_is_bored@Posted: Sun Jan 22, 2006 5:47 am :
When you enter key/value pairs into the coorisponding text boxes, are you pressing enter afterwards?