Coding Question: Changing Pawn Class *fixed it*
Coding Question: Changing Pawn Class *fixed it*
I'm porting my mutator from ut2003 to 04 and need to use my own pawn class. Yes, I know it breaks compatability with other things, but it cannot be helped, this is the only way to do it. The method I used for 03, changing xPlayer's default PawnClass, doesn't work anymore. Is it possible at all anymore without having to make a different gametype?
Last edited by T-Bone7 on Tue Aug 17, 2004 12:16 am, edited 1 time in total.
Wombats fall from the sky and reality disappears...
Re: Coding Question: Changing Pawn Class
You should be able to change it in ModifyPlayer of the mut, can you post the code where your trying to change it?T-Bone7 wrote:I'm porting my mutator from ut2003 to 04 and need to use my own pawn class. Yes, I know it breaks compatability with other things, but it cannot be helped, this is the only way to do it. The method I used for 03, changing xPlayer's default PawnClass, doesn't work anymore. Is it possible at all anymore without having to make a different gametype?
Jb
well, I was trying to change xPlayer's default pawnclass in postbeginplay.
That worked fine in '03, but it doesn't do jack now. How could you change the pawn class in modifyplayer?
Code: Select all
simulated function PostBeginPlay()
{
Class'xGame.xPlayer'.Default.PawnClass=Class'InstantCombo2004.ICPawn';
Class'UnrealGame.Bot'.Default.PawnClass=Class'InstantCombo2004.ICPawn';
Super.PostBeginPlay();
}
Wombats fall from the sky and reality disappears...
Figured it out.
For those who may need the method, It's very simple...
Thanks for your help anyway jb, I'm sure you're a busy man.

Code: Select all
simulated function PostBeginPlay()
{
Level.Game.DefaultPlayerClassName = "InstantCombo2004.ICPawn";
Super.PostBeginPlay();
}
Wombats fall from the sky and reality disappears...