Excuse me for being thick, I just want to double check something.
I've done a load of simple coding for my singleplayer campaigns in 2K4, but I'm still very confused with UT3..
Ok, so using the Scorpion as an example, because it's pretty simple (kinda like me)..
So, UTVehicle_Scorpion_Content extends from UTVehicle_Scorpion, that means for a basic subclassed Scorp we can just extend from UTVehicle_Scopion_Content.
I understand that suclassing from the "_Content" class would mean that all the sounds, meshes, etc.. from the original scorp would also be loaded into memory, but then again we will need all that anyway, so no harm done.
What I'm confused about is where functions & variables are divvied-up between these two classes.
For example;
From UTVehicle_Scorpion;
These are pretty important values, and ideally I would like to modify things like health and speed without having to subclass an extra class.Code:defaultproperties { Health=300 StolenAnnouncementIndex=5 COMOffset=(x=-40.0,y=0.0,z=-36.0) UprightLiftStrength=280.0 UprightTime=1.25 UprightTorqueStrength=500.0 bCanFlip=true bSeparateTurretFocus=true bHasHandbrake=true bStickDeflectionThrottle=true GroundSpeed=950
So, if I want to modify say the groundspeed and max health, do I *have* to subclass UT_VehicleScorpion, or, can I override these values in my subclassed UTVehicle_Scorpion_Content?
And if I can override them, can I just declare the new default properties at the bottom of the script, or do I have to use an actual function (like, PostBeginPlay for example) and actually set the new value.
For example
In UTVehicle_Scorpion_Content;
Code:SimulatedFunction PostbeginPlay() { GroundSpeed = Something; Health = SomethingElse; //This is ugly, but if I can't find another suitable function I'm willing to do it }
Do you see what I mean, or does that make no sense to anyone else?
Same thing with the wheels.
Let's say i want a 4-wheel steered Scorpion.
Do I have to subclass the base Scorpion class, or, can I just add the new wheel declarations to my subclassed UTVehicle_Scorpion_Content class?
Thanks.
*EDIT*
Oh, I'm such an idiot.
Since the _Content class extends from the base class, it inherits all the base class variables & props anyway doesn't it?
Right, so that means that the _Content class *does* have the wheel structs (objects) and all the other values I mentioned, so in theory, all I need to do is extend from the _Content class, and make all my modifications in there, right?




)..

Reply With Quote




Bookmarks