Time for action – A new script package
It's been awhile since we set up a script folder, so let's go through the steps again:
Create a new folder in the
Development\Src
folder calledBrokenGame
.Create a folder inside
BrokenGame
calledClasses
.In the
BrokenGame\Classes
folder, create a new file calledBrokenActor.uc
.In
BrokenActor.uc
, write the following code:class BrokenActor extends Actor placeable; defaultproperties { Begin Object Class=SpriteComponent Name=Sprite Sprite=Texture2D'EditorMaterials.TargetIcon' Scale=0.35 HiddenGame=true End Object Components.Add(Sprite) }
Before we can compile, we need to add our new package to
DefaultEngine.ini
. OpenUDKGame\Config\DefaultEngine.ini
, and at the end of the[Engine.ScriptPackages]
section add our new package:[Engine.ScriptPackages] +NonNativePackages=UTGame +NonNativePackages=UTGameContent +NonNativePackages=AwesomeGame +NonNativePackages=BrokenGame
Also at the end of the
[UnrealEd.EditorEngine]
section...