PDA

View Full Version : I'm in need of a bit of guidance



AinigmA
11-22-2009, 10:23 AM
Hey,
Thanks for trying to help. I'm having trouble getting the whole grasp here.
I've created a new vehicle extended from UTVehicle_Cicada. I've put it in one of my levels.
I would like to start modifying how it flys and the controls for it, etc. But I don't understand where everything is taken care of in the code.

For example. I want this vehicle to have an adjustable throttle control rather than the Press&Hold to go. So I created a couple of test functions in my PlayerControllerClass. they are executed from the UTInput.ini upon key strokes. I did this to simulate ThrottleUp and ThrottleDown commands with `log lines. Now I want to plug it in to the actual Vehicle class but I don't know how to make that jump from the PlayerController to the Vehicle. Or how to even access the vehicle. If you could illuminate where I'm going wrong or if you have a better way of going about this that would be stellar.
Thanks

Ainigma

itach1
11-22-2009, 07:41 PM
I'd look at whatever movement functions exist in UTVehicle_Cicada and start overriding stuff from there in your new class?

AinigmA
11-23-2009, 05:54 AM
Where can I find the Vehicle(Pawn) and UTVehicle(Pawn) functions?
I want to create one for my new vehicle class.

Blade[UG]
11-23-2009, 06:47 AM
Those aren't functions, those are casts used to make sure that the Pawn is also a Vehicle or also a UTVehicle. From what I remember of digging through the vehicle code in UT04, when you enter a vehicle, your playercontroller possesses the Vehicle. So, presuming that this works the same, you have a class NewVehicle, when you want to talk to it from NewController, you'd do something like ...



if( NewVehicle(Pawn) != None) // we're controlling a NewVehicle
NewVehicle(Pawn).AdjustThrottle()

AinigmA
11-23-2009, 09:24 AM
Great!
Thanks for the help Blade[UG] and itachi1.
It turns out my original issue was from having the wrong vehicle in the map. I was editing my new class and playing with the cicada.