Coding Question: Changing Pawn Class *fixed it*

Feel free to chat about non-Chaos stuff in here.
Post Reply
T-Bone7
Posts: 49
Joined: Tue Jul 15, 2003 4:49 am
Location: Louisiana, USA

Coding Question: Changing Pawn Class *fixed it*

Post by T-Bone7 »

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...
jb
Posts: 9825
Joined: Fri May 03, 2002 12:29 am
Location: Coral Springs, FL
Contact:

Re: Coding Question: Changing Pawn Class

Post by jb »

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?
You should be able to change it in ModifyPlayer of the mut, can you post the code where your trying to change it?
Jb
T-Bone7
Posts: 49
Joined: Tue Jul 15, 2003 4:49 am
Location: Louisiana, USA

Post by T-Bone7 »

well, I was trying to change xPlayer's default pawnclass in postbeginplay.

Code: Select all

simulated function PostBeginPlay()
{
	Class'xGame.xPlayer'.Default.PawnClass=Class'InstantCombo2004.ICPawn';
	Class'UnrealGame.Bot'.Default.PawnClass=Class'InstantCombo2004.ICPawn';

	Super.PostBeginPlay();
}
That worked fine in '03, but it doesn't do jack now. How could you change the pawn class in modifyplayer?
Wombats fall from the sky and reality disappears...
T-Bone7
Posts: 49
Joined: Tue Jul 15, 2003 4:49 am
Location: Louisiana, USA

Post by T-Bone7 »

Figured it out. :D For those who may need the method, It's very simple...

Code: Select all

simulated function PostBeginPlay()
{
	Level.Game.DefaultPlayerClassName = "InstantCombo2004.ICPawn";

	Super.PostBeginPlay();
}
Thanks for your help anyway jb, I'm sure you're a busy man.
Wombats fall from the sky and reality disappears...
jb
Posts: 9825
Joined: Fri May 03, 2002 12:29 am
Location: Coral Springs, FL
Contact:

Post by jb »

Doh sorry I did not see your reply. Sometimes there are many threads and I can not see them all. Sorry sorry sorry!
Jb
Post Reply