Hello I am trying to make a custom Player Controller work except whenever I try to access the pawn it is controlling it always says none. When I test it I says that it is using my custom player controller, as well as my custom game info. The strange thing is the pawn will spawn in the world and I can move it, just all references to it won't work, including a log in its PostBeginPlay().
Here is the code for the controller:
Here is the code for my game info:Code:class MyPlayerController extends GamePlayerController; simulated event PostBeginPlay() { super.PostBeginPlay(); `log("*****************************"); `log("I am a custom Player Controller"); `log(Pawn.Class); `log("*****************************"); } DefaultProperties { }
And finally here is the code for my pawnCode:class MyGameInfo extends GameInfo; DefaultProperties { PlayerControllerClass = class'Tutorial.MyPlayerController' DefaultPawnClass=class'Tutorial.MyPawn' PlayerReplicationInfoClass=class'Tutorial.MyPlayerReplicationInfo' //HUDType = class'MyHUDWrapper' bRestartLevel=false bDelayedStart=false }
Thanks guys!Code:class MyPawn extends UDKPawn; event PostBeingPlay() { super.PostBeginPlay(); `log("****I am a custom Pawn*****"); } DefaultProperties { begin object Class=DynamicLightEnvironmentComponent Name=MyLightEnvironment bEnabled=true end object Components.Add(MyLightEnvironment) begin object Class=SkeletalMeshComponent Name=InitialSkeletalMesh LightEnvironment=MyLightEnvironment SkeletalMesh=SkeletalMesh'Prototype_Mesh.OurMesh' AnimSets(0)=AnimSet'Prototype_Mesh.OurAnimSet' AnimTreeTemplate=AnimTree'Prototype_Mesh.OurAnimTree' //PhysicsAsset=PhysicsAsset'Prototype_Mesh.OurPhysicsAsset' end object Mesh=InitialSkeletalMesh Components.Add(InitialSkeletalMesh) CollisionType=COLLIDE_BlockAll begin object Name=CollisionCylinder CollisionRadius=+035 CollisionHeight=+057 end object CylinderComponent=CollisionCylinder }



Reply With Quote

Bookmarks