Once I get that upgrade to 36-hour days, I will tackle that. – Mychaeel
Difference between revisions of "UE3:Hello World"
m (Added tutorial category) |
m (no underscores in links) |
||
Line 37: | Line 37: | ||
Congratulations, you've made your first UT3 mutator. | Congratulations, you've made your first UT3 mutator. | ||
− | [[Category: | + | [[Category:Programming tutorials (UT3)]] |
Latest revision as of 01:15, 13 June 2010
Assuming you have read the first UT3 lesson on UT3 Whats What, You should be ready to make your first mod.
The simplest of mods is the "Hello World" mutator.
Getting Ready[edit]
Go to "My Documents\My Games\Unreal Tournament 3\UTGame\Src" (or equivelent) and create a new folder. The folder name will be the package name for your mod. For this tutorial, name the folder "HelloWorld". In this folder, create another folder called "Classes". The Classes folder is where all your source files will go.
Open up "UTGame\Config\UTEditor.ini" and find the [ModPackages] section, and add to it a line that reads "ModPackages=HelloWorld"
Save and close the file.
Create a file in "UTGame\Src\HelloWorld\Classes" and name it "HelloWorld.uc" and open it for editing.
Either open notepad and Save As, or create a new .txt document and rename it, making sure that it has the correct file extension. (By default, windows hides known file extensions. This can be disabled in Tools>Folder Options...>View.)
The Code[edit]
class HelloWorld extends UTMutator; function InitMutator(string Options, out string ErrorMessage) { loginternal("Hello, World!"); Super.InitMutator(Options, ErrorMessage); }
Note: The class name must be the same as the file name.
Either by command line or shortcut, run 'ut3.exe make' to compile it. There should be no errors.
In the same manner, run 'ut3.exe -useunpublished' and start a game with your mutator. When the mutator is loaded, "Hello, World!" will be output to a log file.
The log file will be found in "UTGame\Logs\".
Congratulations, you've made your first UT3 mutator.