PDA

View Full Version : Question about subclassing


Quintin Stone
14th Apr 2000, 08:32 PM
It looks like I've found how to create new console commands. In PlayerPawn line 1138, there's a series of exec functions that seem to define console commands. So if I subclass a new player class, I can add my own commands there.

My question: is it possible to subclass PlayerPawn and have all of PlayerPawn's existing subclasses (like TournamentPlayer and its children TournamentMale and TournamentFemale and so on) inherit my changes? Do I have to extend every existing child class of PlayerPawn no matter how deep? Please tell me Epic planned for such an obvious flaw!

Aridale N. Belmont
14th Apr 2000, 09:56 PM
Well when I created new player classes for Unreal I all I did was subclass the playerpawn. Add in my own exec functions as part of the normal code and binded the functions to keys. Worked AOk.

Ari

Quintin Stone
15th Apr 2000, 12:09 PM
Really? Could I trouble you for some details? I'm kind of a novice at UnrealScript (in case you couldn't tell). How did you get UT to actually use your extended PlayerPawn instead of the standard? Was this a matter of the name, or perhaps SpawnNotify to replace PlayerPawn with the subclassed MyNewPlayerPawn? I'd really appreciate any details you can offer.