These instructions show how to compile scripts found else where and changing the properties of objects in the game. The example I will show is extending the properties of the Flack Cannon to increase its ammo count.
To explore other items you may wish to change get a copy of the Script source and look through it for scripts that you wish to control.
How to Override Default Properties of a class
FlackCannon Example:
Folder structure:
Inside of C:\Users\UserName\Documents\My Games\Unreal Tournament 3\UTGame\Src\
Start by adding a folder where your work will be held. In my example "TestPackages" will be the starting point. Beneath that add Classes folder. Then place the text file with the code you wish to change.
"TestPackage" This is the name of the top level folder you placed your script in. This tells the compiler where to look when compiling.
Save and close this file.
To compile place the make flag on a short cut to UT3.exe
ie "C:\Program Files (x86)\Unreal Tournament 3\Binaries\UT3.exe" make
Now run the short cut.
If all goes well a console will pop up with the out put of the compilation telling if it completed successfully. If so continue, else carefully go back and check your file names, their paths and syntax are all correct and repeat.
The Custom Weapon Class will be available inside of Generic Browser Pickup Factory Tree
Go ahead and place the actor inside of game.
When publishing this level place the the resultant script (MyFlakCannon.u) into the /Published/CookedPC/Script Folder. That new script should now be available in game.
Because of the inheritance properties of Uscipt it is easy to create new custom classes that extend (inherit) all the properties of another class. So allowing small and large changes with next to no understanding of the language, so giving the novice a toe hold with which to explore the language.
-- Edited by Achernar on Saturday 26th of March 2011 07:49:57 AM
Created .uc file in the Classes folder > MyFlackCannon.uc
Use Notepad++ to create the .uc file and be shure to save as ANSI format. __________________________________________________ class MyFlackCannon extends UTWeap_FlakCannon;
defaultproperties { AmmoCount=30 Locker AmmoCount=40 Max AmmoCount=60 ItemName="My Flak Cannon" PickupMessage="You got a better Flak Cannon" }
ModPackageinPath=\UtGame\Src ... \\Add this line. The "TestPackage" is the name of the top level folder you placed your script in.
ModPackages=TestPackage
To compile place the make flag on a short cut to UT3.exe ie "C:\Program Files (x86)\Unreal Tournament 3\Binaries\UT3.exe" make
Now run
UT3.exe Make
Now the Custom Weapon Class will be available inside of Generic Brower Pickup Factory Tree
Go ahead and place the actor inside of game.
When publishing this level place the the resultant script (MyFlakCannon.u) into the /Published/CookedPC/Script Folder. That new script should now be availble in game.