The biggest thing standing between you, and seeing the results of you code, is knowing how to tell the UDK engine where it is!
As mentioned in the previous section, if you chose to do the "Custom" install, things are already set up for you, and you can probably skip this page unless you really want to learn details.
In the UnrealEditor, with your target map open, do
View -> WorldInfo (Open the "Game Type" section) Default Game Type: [selector, choose YourGameType] Games Types Supported on this map: [press the +, to add, then choose YourGameType] Games Type For PIE: [selector, choose YourGameType]Do note that YourGameType will not show up in this menu, until it has been compiled. More on that below.
Note also, that this will not change what game type runs a map 'normally' (running UDK directly, rather than through the Editor). Give details on symlink hack!
class YourGameInfo extends GameInfo; defaultproperties { // Change or remove any of these as desired HUDType=class'CustomGame.HUD' PlayerControllerClass=class'CustomGame.YourPlayerController' DefaultPawnClass=class'CustomGame.YourPawn' }
Important tip #1 UDK often organizes things in terms of "GROUP.somename". In the above example, we use "CustomGame.". It is critical that this grouping match the name of the directory you save it to.
Important tip #2 if you don't have the above framework code provided for you, you may have to edit the main .ini file anyway, to tell UDK where to compile program code files. See below for details on the .ini file that needs editing.
The #1 most important file is:
[UDK-TOP]\UDKGame\Config\DefaultEngine.ini
If you took my advice, and did two installs of UDK, then you will be able to
compare DefaultEngine.ini from each install type.
While there are lots of things that are the same, there is a very large
amount that is quite different between the two files. The UT Sample
configs, do all kinds of things, such as having UT-themeed loading screens.
At this point, we don't care so much about that. I'll focus on just two things; How to get your code compiled, and how to set default game type.
[UnrealEd.EditorEngine]This allows someone to experiment with both the UT classes, and their own, in a single combined map.
+EditPackages=UTGame
+EditPackages=UTGameContent
+EditPackages=CustomGame
Please note, however, that you are not allowed to redistribute the UT material yourself.
This one change, will allow your code to automatically be recompiled as needed when you start up the UDK Editor. It will also allow you to select your GameInfo for a map, as mentioned in the previous section. This will only affect maps run in the Editor, however.
Alternatively, if you want to support multiple game types, read the next bit carefully[URL] Map=YourMapName LocalMap=YourMapName ;; you can possibly leave TransitionMap alone
It turns out that the target of a symlink can be more than just an executable name. It can be an executable name With Arguments.
It turns out that there are lots of potential arguments for the UDK executable. However, we'll just concern ourselves with the arguments required to override map and game type for UDK.
Edit the "Target" property of the symlink, and make it look something like the following:
[URL] C:\UDK\UDK-2013-02\Binaries\Win64\UDK.exe MisaMap?game=Misa500src.M5Game
Prev: Your Code Quickstart -
Top of tutorial -
Next: UnrealScript Basics
Written by:Philip Brown
Bolthole Top
Search Bolthole.com