Time for action – Setting up a scenario
Before we start debugging, we need something that's broken that we can use to test our skills. The first thing we need to do is get our own PlayerController
class working.
Remembering that our
PlayerController
class is specified in theGameInfo
, that is where we need to start. Let's add a new file to ourDevelopment\Src\BrokenGame\Classes
folder calledBrokenGame.uc
.Write the following code into
BrokenGame.uc
:class BrokenGame extends UTDeathmatch; defaultproperties { PlayerControllerClass=class'BrokenGame.BrokenPlayerController' bDelayedStart=false bUseClassicHUD=true }
Now we need to create the
BrokenPlayerController
class. Start by creating a new file inDevelopment\Src\BrokenGame\Classes
calledBrokenPlayerController.uc
.Write the following code in
BrokenPlayerController.uc
:class BrokenPlayerController extends UTPlayerController; defaultproperties { }
Now we're going to change
BrokenActor
a bit. We'll borrow some code from theAwesomeEnemy...