PDA

View Full Version : Spawning different pawn classes



ScrubMonkey
05-19-2011, 09:51 PM
Hey,

I am currently working on a game for a uni assignment and I'm having a little trouble. My game has three characters (lets call them red, green and blue). These three characters have their own set of abilities. I need to assign these three characters to three different players i.e. Player 0 is red, Player 1 is green and Player 3 is blue. I would like to be able for the player to choose which one they want to spawn as but this is just a prototype to start with so forcing them to be a character will be just fine. I have the pawn classes written up and everything i just don't know what i have to write in my GameInfo file to spawn them correctly.

I know its probably really simple but I've searched and searched and found nothing D:

Any help would be great

Thanks

Crusha K. Rool
05-19-2011, 10:28 PM
One approach can be to use have a single Pawn class and let the UTFamilyInfo subclasses handle the look and abilities of the individual character variations. Assigning a UTFamilyInfo to a Pawn will automatically take care of assigning the FamilyInfo's SkeletalMesh, Materials and so on to the actualy Pawn.

Blade[UG]
05-20-2011, 07:36 AM
try doing what you need to do in SpawnDefaultPawnFor()