View Full Version : PlayerPawn Question
5th Dec 1999, 12:15 PM
Would anybody know how I would go about adding some variables and functions to the PlayerPawn class without changing the engine.u file whilst still having my changes being inherited to the child classes of PlayerPawn?
5th Dec 1999, 12:50 PM
I would assume making you're own script under the PlayerPawn would work.
5th Dec 1999, 04:08 PM
To do this you must do like wanderer said and add a class under the PlayerPawn. Then save it as your own package so it doesnt overwrite the engine.u file. Or you could create a new class "MyPlayerPawn" parallel to PlayerPawn. but then you would have to add in all the classes under it (which would suck unless you are making a really indepth mod /~unreal/ubb/html/smile.gif Then just add the mod name that you saved it as in you unreal.ini file so it will always load up with the editor.
Hope that makes a little sense. I think im too tired to be making posts right now /~unreal/ubb/html/smile.gif
5th Dec 1999, 04:51 PM
By subclassing the PlayerPawn class, wouldn't the child classes of PlayerPawn not inherit my changes? Or have I misunderstood?
5th Dec 1999, 08:45 PM
I think you are right. Im not the best at scripting but hopefully together we can come up with something that makes sense /~unreal/ubb/html/smile.gif
When you add functions in the parent class it does affect the child classes but isnt that what you want? anyway if your child classes dont call those functions then it wont matter...im going to re-install ued and take a look around. questions..comments?
Aridale N. Belmont
6th Dec 1999, 01:51 AM
Basically if your creating a new player class type deal or set of classes then you wanna make a default class to branch all your children from. If you are making some kinda new player class to PLAY THE GAME AS not a class as in script class then you need to make a player under Unreal Player, where Male1 and all that **** is. Then set the maps class to that default playerclass load the map from the game with that as the ?class or make a .int to make the class selectible from the menu like the others. If its something that needs for all child classes to inherit certain varibles then your best bet is to make a new playerpawn in the same subclass as the orginal player pawn not subclass player pawn itself. Cause a subclass will only pass to a child so if you subclassed PlayerPawn then youd have to subclass your new class everytime you wanted a new class and subclass that class for a different version of that class. If you subclass your own version of playerpawn with only changed what needs changing from the orignal playerpawn then you'll only have to make 1 new separate class for each new version needed script wise. Instead of subclassing a subclass for a subclass. Hope I didnt confuse ya. If you need more help tell me more indepth what your making and I'll give ya more case sensitive help =)
6th Dec 1999, 06:40 PM
Hey Ari, do you think you could go into more depth on setting up an .int. Thanks
Aridale N. Belmont
6th Dec 1999, 10:47 PM
Ok open up some text editor that wont save format like MSDOS Edit then in the systems folder open somethin like unreal.int and look at the lines for the player ints they look like this.
Object=(Name=UnrealShare.MaleThree,Class=Class,MetaClass=UnrealShare.UnrealiPlayer,Description="Male 3") Copy that line and then make a new doc. Put "[Public]" on the first line just like in Unreal.int and insert that line under it. And change everything in that line to match your class. Like this is mine for my Drow player class compared to the real Male 3 one.
Real Male Three
My Drow Male
I saved it as DrwPawns.int. The name of the .int doesnt matter Unreal automatically exes all .int's found in the system folder. But I suggest naming it something that is easily reconizible as your class. Then you need a .int for the skins for that class. You know how to make a .int for a skin set? If in your classes default props no skin is set then the class wont appear in the menu in the actual game. If ya need anything else just lemme know.
7th Dec 1999, 12:53 AM
Thanks Ari. I made the .int file for my class but still didnt show up. After reading your last post i guess its cause i didnt make a skin .int. So if you dont mind would you explain that as well. /~unreal/ubb/html/smile.gif
Aridale N. Belmont
7th Dec 1999, 04:38 PM
Ok you dont NEED a new skin .int for your class unless you want it to be able to use custom skins. So somethin musta went ary elsewhere. Did you make sure that in your classes default props that there was a default skin set and saved to the class in .u? And not to mention that its draw type is set to mesh and it has a mesh set? Cause that could be another thing messing it up. Also how exactly did you make this class? If its a new class of male thats going to use the male three mdl did you subclass Male NOT Male Three and copy all the stuff from male three into it and then made the changes to make your class NOT Subclass male three cause then its actually MALE THREE with changes not a completely different class. Have you used your class in Unreal to see if it all works right? Like setting that class as the default class in a test level or using the console command to open a map with the player being your class? Just in case you havent or dont know the command its "open MAP?class=PACKAGE.NAME" Then do a behind view 1 to see yourself or look at a reflective surface and see if the mdl and display is all correct then if your class has anything special about it check those things and make sure you are indeed your class. If you can do all that and your class works fine then its something in the .int If you made the .int in basically anything other than MSDOS Edit then it probably wont work cause even notepad saves a .txt format to stuff regardless of what is real extension is. Anyway now just in case you wanna try it I'll explain the skin process. If your making a new skin set and .int then make sure you make atleast two different skins cause a bunch of .ints for just one skin messes things up. If you know how to make a new skin set then all this is blather but if you dont.
You need to make a new texture and name the set after the mdl the class uses like MaleThreeSkins so if your class is a knight using the malethree mdl then your Texture set for the skins would be called MaleThreeSkinsKnight and the .int is named exactly the same but with .int instead of .utx The .int should be set up like this.
Orginal Male Three skin .int
My Drow Male three skin .int Named MaleThreeSkinsDrkEl
And there ya have it. The name after the package name is the actual title of the Skin as found in the texture set. Class of course is texture. The name of the .int is the key here unlike the Pawn.int. The name of it here is use to apply the skins to the mdl they work for. If ya need anything lemme know
7th Dec 1999, 09:12 PM
Thanks alot Ari. I will check it all out and get back to you as soon as i go through all your steps in detail. /~unreal/ubb/html/smile.gif
vBulletin® v3.8.7, Copyright ©2000-2014, vBulletin Solutions, Inc.