How to add a nanokey

Prerequisites:
Adding a Deus Ex style door

Overview:
This will show you how to set up a nanokey so that it can unlock a particular door.  If you've followed the Adding a Deus Ex door tutorial, you probably already know how to do this, but I'll cover it quickly again.

1. Set the Key ID of the door

If you don't already have a DeusExMover brush that is set up to be a door, you'll need to add it.  Right-click on the door brush and select Properties.  Set the KeyIDNeeded value (under DeusExMover) to something meaningful.  Remember to set bLocked to TRUE, or your key isn't going to mean much!

 

2. Place and set up the nanokey

Now place the nanokey in your map.  It's under Inventory -> Pickup -> DeusExPickup.  Right-click on it and select its properties.  Set the KeyID to the value that you set the KeyIDNeeded to above.

You can also select the appearance of the nanokey by setting the SkinColor property:

SC_Level1
SC_Level2
SC_Level3
SC_Level4

Your key will always show up in UnrealEd as the blue Level 1 key, but in the game it will display correctly.

You'll also want to give the key a description that the player sees.  Expand your nanokey's Inventory properties and fill in the Description value with something appropriate:

If you don't do this, the player will see "NO KEY DESCRIPTION - REPORT THIS AS A BUG!" in the inventory screen.

That's it!


Adding a Nanokey to an NPC's inventory
(using the PickupDistributor)

Overview:
You can also add a specific nanokey to a character's inventory instead of adding it directly to a map.  If the player kills or stuns the NPC, he or she will be able to get the key from the NPC's body.

 

2b. Add PickupDistributor

You'll still need to follow Step 1 above, but instead of adding a nanokey and changing its properties, you can add a PickupDistributor.  Each PickupDistributor can add up to 8 nanokeys to NPC's.

Under Actor -> Keypoint, select PickupDistributor, and add one to your map.  It doesn't matter where you add it, but you might want to put it near your DeusExLevelInfo and/or PlayerStart to make it easier to find.

Pull up its properties and expand PickupDistributor -> NanoKeyData -> [0].  Fill in the Description, KeyID, and SkinColor values, just like you would in Step 2 above.  You'll also need to fill in the ScriptedPawnTag to identify which character should get the key.  If you have multiple characters with the same Events -> Tag value, you'll need to change the specific character's Tag value to something unique.


If you have more keys to give to more NPC's (or the same NPC for that matter), you can fill in more values.  If for some reason you have more than 8 keys to distribute, you can add additional PickupDistributor items.


Back to main page