legacy-Roy_Fokker
08-30-2003, 01:34 PM
i need to know how i can access the varaible in the class myVehicle from class TempHud
class myVehicle extends Pawn
config(User);
//Basic Vehicle Controls--
var float Steering; // between -1 and 1
var float TurnRate; // How many units it can turn in one second.
var float Throttle; // between -1 and 1
var float RateOfAccel; // The Acceleration until reaches Throttle Position
defaultproperties
{
TurnRate = 1.0;
Steering = 0;
Throttle = 0;
RateOfAccel = 10;
}
class HudTemp extends HudBase;
simulated function DrawHud(canvas c)
{
local float vehThrottle;
super.DrawHud(c);
if (PawnOwner.IsA('myVehicle'))
{
c.Drawtext("In A Vehicle");
vehThrottle = myVehicle(PawnOwner).Throttle; //Hmmmmmm Should work??
c.Drawtext(vehThrottle);
}
}
Few things i have tried, but my lack of UTscripting knowledge hinders me. Any suggestions / tips :confused:
class myVehicle extends Pawn
config(User);
//Basic Vehicle Controls--
var float Steering; // between -1 and 1
var float TurnRate; // How many units it can turn in one second.
var float Throttle; // between -1 and 1
var float RateOfAccel; // The Acceleration until reaches Throttle Position
defaultproperties
{
TurnRate = 1.0;
Steering = 0;
Throttle = 0;
RateOfAccel = 10;
}
class HudTemp extends HudBase;
simulated function DrawHud(canvas c)
{
local float vehThrottle;
super.DrawHud(c);
if (PawnOwner.IsA('myVehicle'))
{
c.Drawtext("In A Vehicle");
vehThrottle = myVehicle(PawnOwner).Throttle; //Hmmmmmm Should work??
c.Drawtext(vehThrottle);
}
}
Few things i have tried, but my lack of UTscripting knowledge hinders me. Any suggestions / tips :confused: