Tuesday, October 2, 2012

GSP 340 Week 4

This week I learned how to add key bindings and how to make add a simple HUD. While I was doing my key bindings I thought of what else I can do with them, because in our assignment we just had to change the camera perspectives. I was able to think of a lot of things you can key bind something to. For example, you can load a level using key bindings you would just have to load the level in kismet and in that key bind call that command.

The HUD requires a couple of more custom things to work. First you need to have a custom game type to call your HUD, secondly you need a HUD mod to overwrite the game HUD, and lastly you need whatever commands you want your HUD to show. In our homework we had to show Health and Ammo count. I was able to get the Health to work fine but the ammo is a little tricky I know that your ammo is located in your weapon but I don't know the command to check the current weapon your holding. I tried to do a little research on it and a lot of people were doing lots of complicated things. Our professor told us that it is like the Health but you would have to swap out a couple of things. Those couple of things are what I don't know how to do. I feel that I'm almost there I just need that final syntax to get it working correctly.


Here is a short tutorial on how to key bind something using Unrealscript.

First you would have to navigate to your UDK Folder and open up "DefaultInputs.ini" (Mine is in "C:/UDK/UDK-2011-10/UDKGame/Config/"


Then you would head down until you reach "Game Keyboard/Mouse Bindings" Next you would either type everything out that is there in a new line at the bottom or copy/paste the last line of code. Here you would change two things. First the key and secondly the command should be "causeevent xxx" so it should look something like this. ".Bindings=(Name="H",Command="causeevent RaulMode")" Here what it's doing is when "H" is pressed it would look for IN KISMET the "Console Event RaulMode you can name it whatever you like. I just named mine something simple so that when I look at my code I know what goes where.

Next you would go into Kismet in UDK and create something (I made my key bind give me infinite ammo and God mode). You would create a "Console Event" and have it be "RaulMode" I added a Play Announcement so that I know something happened (The Console Event is located in NewEvent>Console Event)



No comments:

Post a Comment