Hello,
I'm not sure if that's the right title, but I have no idea how else to phrase it. Basically, I'm trying to set the FamilyInfo class of a Player Controller. Here's what I have so far:
Code:class UPHPlayerController extends UTPlayerController; var class<UTFamilyInfo> CharacterClass; simulated event PostBeginPlay() { super.PostBeginPlay(); } exec function SpawnAsChar(string CharName) { CharacterClass=class'UPHFamilyInfo_"CharName"'; ServerSetCharacterClass(CharacterClass); } defaultproperties { InputClass=class'UPHGame.UPHPlayerInput' CharacterClass=class'UPHFamilyInfo_BaseChar' }
The line I'm focusing on is CharacterClass=class'UPHFamilyInfo_"CharName"';. Is there a way of doing this? I get an error Error, Unterminated string constant: '; Obviously the alternative is an if function for each character, but if I can get this to work, it'll save a lot of lines of code.
Thanks,
Zaiteria




Reply With Quote


Bookmarks