Time for action – Customizing the Pawn class
We're going to get more into the Pawn
class in a bit, but since the GameInfo
class tells the game which Pawn
class to use, we'll create it now and investigate what those two things around our player are, now that we start with no weapon.
Create a new file in our
Development/Src/AwesomeGame/Classes
folder calledAwesomePawn.uc
. As always, we'll put some test code inPostBeginPlay
to make sure our class is working:class AwesomePawn extends UTPawn; simulated function PostBeginPlay() { super.PostBeginPlay(); `log("AwesomePawn spawned! ====="); } defaultproperties { }
That's it for this class for the moment; now let's tell the game to use our class.
In
AwesomeGame.uc
, let's set ourPawn
class in the default properties:DefaultPawnClass=class'AwesomeGame.AwesomePawn'
Compile the code and run the game, and we'll see our log show up:
[0006.55] ScriptLog: AwesomePawn spawned! =====
Now to get rid of the floaty thingies. As with our giant floating...