Tutorial Request: Keypad in UDK

Hi all,

Im new here, so i would like to ask, how to make a keypad in UDK ( UE3 )with kismet, unrealscript?
I searched many sites and i only found for UE4… :frowning:
If someone can make/post an easy tutorial, it would be really awesome! :slight_smile: ( i appreciate that ! )

So…like this:Unreal Engine 4 - Blueprints Keypad Tutorial - YouTube

Thank you in advance for your answer!

That’s fairly complicated, and I don’t think anyone is going to make a new tutorial for a (mostly) dead engine. I strongly suggest that if you’re starting a new project, you should start it in UE4. That being said, I can tell you how I would do it in UDK:

  1. Create an UnrealScript interface that contains a generic Interact() function. For anything in the world that the player can interact with (say, a computer, an elevator button, an NPC, a keypad), you can make their class implement this interface.

  2. Create a Flash movie using Scaleform that will show the keypad. Give each button an EventListener that will update the display. Give it a function makes an ExternalInterface.call() and pass a boolean for whether the code was correct or incorrect.

  3. Create an UnrealScript class that extends [GFxMoviePlayer](UDK | ScaleformTechnicalGuide Class). Give it all of the necessary functions for interacting with your Flash movie.

  4. Create an UnrealScript class that extends StaticMeshActor and implements the interface you made above in step 1. This is going to represent your keypad in the game world. Give it an editable string property such as var() string Password. This will be the password that the player has to enter.

  5. In your PlayerController class, in the Tick() event, do a trace from the player’s location, out some distance along the vector where the player is looking to get TargetedActor. Then in a separate Use() function (triggered by the E key or something, set in your DefaultInput.ini), if YourInterface(TargetedActor) != none, then call YourInterface(TargetedActor).Interact().

  6. Create a Kismet [event](UDK | KismetUserGuide Events) that gets called by Interact(). Give the sequence an object variable for the instigator. Use a Compare Object node to find out which keypad (assuming there are several) is being used. Hook that into a get property to find its Password variable. Hook that into an Open GFx Movie. Get the password variable from the Movie Player and compare it to the correct password. Then hook that into a play Matinee to open a door or whatever the keypad does if the player got the code right.

I strongly suggest that you make the keypad pop up as an overlaid UI instead of interacting with the keypad in the 3D gameworld. If you want to interact with the keypad in the game world as shown in the video above, then you have a lot more work to do:

You need to create a texture for the GFxMovie to render to, create a material that uses that texture, then you’ll need to have your static mesh actor create a new material instance and pass the texture to the material instance. In your PlayerController.tick() you’ll also need to keep track of what part of the keypad you’re pointing to, and pass that info to the GFxMoviePlayer.

Of course, that’s all off the top of my head; I haven’t actually tried making it, and my instructions could be full of mistakes. If any of that makes you feel uncomfortable, then you really, really ought to just go to UE4 and follow the tutorials you already found.

Hi Nathaniel3W,

Sorry for this late reply, many thanks the help! I just found a solution to my problem ( in the old forum ), here it is:

This is just a simple “logic” for the keypad, the other things must be do in UIScene.