unrealwiki:Scratchpad: Difference between revisions

From Unreal Wiki, The Unreal Engine Documentation Site
added edit timestamp
Wail (talk | contribs)
No edit summary
Line 8: Line 8:


<uscript>
<uscript>
//=============================================================================
class EONSScorpion extends ONSRV;
// OWweapon.
// Parent class of all Objective Weapons.
// Is also a playable weapon, just for kicks (and coding practice).
//=============================================================================
class OWweapon expands Weapon
abstract;


var() byte clip; // ammo in current clip
var () class<Emitter> AfterburnerClass[2];
var() byte clipmax; // ammo in a fresh clip
var Emitter Afterburner[2];
var() float acc; // how accurate a gun is. 0 is perfectly accurate.
var () Vector AfterburnerOffset[2];
var() byte recoil; // add this much recoil per shot. 0 is no recoil.
var () Rotator AfterburnerRotOffset[2];
var() byte damage; // how much damage the gun does.
var bool   bAfterburnersOn;
var() float rpm; // how many rounds are fired per minute.
var() float reloadtime; // how many seconds it takes to reload.


////////////////////////////////////////////////////////
var bool  bBoost;        //Boost functionality
function fire( float Value ) {
var float BoostForce;
if (clip>0) GoToState('shoot');
var float BoostTime;
else GoToState('reloading');
var int  BoostCount;
var Sound BoostSound, BoostReadySound;
var float BoostRechargeTime;
var float BoostRechargeCounter;
var bool bPrimed;        //When the detonator is primed, collisions cause the vehicle to explode
 
var int SelfDestructDamage;
var int SelfDestructDamageRadius;
var class<DamageType> SelfDestructDamageType;
var int SelfDestructMomentum;
 
var Pawn OriginalDriver;
 
 
replication
{
  reliable if(Role==ROLE_Authority)
    bBoost, bPrimed, BoostCount, BoostRechargeCounter, OriginalDriver;
}
}


function altfire( float Value ) {
 
if (clip>0) GoToState('altshoot');
simulated function PostNetBeginPlay()
else GoToState('reloading');
{
Super(ONSWheeledCraft).PostNetBeginPlay();
}
}


exec function reload() {
 
// local pawn p;
function TakeDamage(int Damage, Pawn instigatedBy, Vector Hitlocation, Vector Momentum, class<DamageType> DamageType)
if (clip<clipmax) GoToState('reloading');
{
  if ( (ClassIsChildOf(DamageType, class'DamTypeShockBeam')) || (ClassIsChildOf(DamageType, class'DamTypeONSMine')) )
    Damage *= 0.8;
  Momentum *= 0.35;
 
  if (bBoost && instigatedBy != none && instigatedBy != self)
    Damage *= 2;
 
  Super.TakeDamage(Damage, instigatedBy, Hitlocation, Momentum, damageType);
}
}


function dorecoil(float value) {
 
local float up, side;
function ChooseFireAt(Actor A)
up = ((value+(FRand()*value*10))/50);
{
side = ((value+((FRand()-0.3)*value*10))/100); // recoil left or right, but more right
Fire(0);
PlayerPawn(Owner).alookup = up;
PlayerPawn(Owner).aturn = side;
}
}


function fireeffects() {
 
local Vector realLoc, X,Y,Z;
function AltFire(optional float F)
local UT_ShellCase s;
{
realLoc = Owner.Location + CalcDrawOffset() + X*60;
Super(ONSWheeledCraft).AltFire(F);
Spawn(class'WeaponLight',,'',realLoc,rot(0,0,0));
// s = Spawn(class'UT_ShellCase',Pawn(Owner), '', realLoc + FireOffset.Y * Y + Z);
s = Spawn(class'UT_ShellCase',, '', realLoc + FireOffset.Y * Y + Z);
// s.Eject(((FRand()*0.3+0.2)*X + (FRand()*0.2+0.2)*Y + (FRand()*0.3+1.0) * Z)*160);
s.Eject(((FRand()*0.3+0.4)*X + (FRand()*0.2+0.2)*Y + (FRand()*0.3+1.0) * Z)*160);
}
}


function ProcessTraceHit(Actor Other, Vector HitLocation, Vector HitNormal, Vector X, Vector Y, Vector Z) {
 
if (Other == Level)
function ClientVehicleCeaseFire(bool bWasAltFire)
Spawn(class'UT_LightWallHitEffect',,, HitLocation+HitNormal*9, Rotator(HitNormal));
{
else if ((Other != self) && (Other != Owner) && (Other != None) ) {
Super(ONSWheeledCraft).ClientVehicleCeaseFire(bWasAltFire);
if ( FRand() < 0.2 ) X *= 5;
Other.TakeDamage(damage, Pawn(Owner), HitLocation, 300.0*X, 'shot');
if ( !Other.IsA('Pawn') && !Other.IsA('Carcass') )
spawn(class'SpriteSmokePuff',,,HitLocation+HitNormal*9);
}
}
}


////////////////////////////////////////////////////////
 
state shoot {
function VehicleFire(bool bWasAltFire)
ignores fire, altfire, reload;
{
Begin:
if(bWasAltFire)
CheckVisibility(); // no idea what this stuff does... best not to remove it?
{
bPointing=True;
Boost();
Owner.MakeNoise(2*Pawn(Owner).SoundDampening);
if (PlayerPawn(Owner) != None) {
PlayerPawn(Owner).ClientInstantFlash(-0.4, vect(650, 450, 190));
PlayerPawn(Owner).ShakeView(ShakeTime, ShakeMag, ShakeVert);
}
}
clip--; // remove a bullet from clip and shoot.
 
TraceFire(acc);
  Super(ONSWheeledCraft).VehicleFire(bWasAltFire);
fireeffects();
Owner.PlaySound(FireSound,SLOT_None,(1*Pawn(Owner).SoundDampening));
PlayAnim( 'Fire', 1, 0.05);
dorecoil(recoil);
sleep(60/rpm);
GoToState('Idle');
Finish();
}
}


state altshoot {
 
ignores fire, altfire, reload;
function VehicleCeaseFire(bool bWasAltFire)
Begin:
{
GoToState('shoot');
Super(ONSWheeledCraft).VehicleCeaseFire(bWasAltFire);
// ProjectileFire(ProjectileClass, ProjectileSpeed, bWarnTarget);
Finish();
}
}


state reloading {
 
ignores fire, altfire, reload;
function Boost()
Begin:
{
if (AmmoType.AmmoAmount > 0) { // if player has spare ammo
//If we're already boosting, then prime the detonator
Owner.PlaySound(CockingSound, SLOT_None,1*Pawn(Owner).SoundDampening);
if (bBoost)
PlayAnim('Down',1,0.05);
{
Sleep(reloadtime);
  bPrimed = true;
if (AmmoType.UseAmmo(clipmax)) clip = clipmax; // fill clip
  PlaySound(BoostReadySound, SLOT_Misc, 128,,,160);
else {
clip = AmmoType.AmmoAmount; // else partially fill clip
AmmoType.AmmoAmount = 0; // and deplete ammo
}
Owner.PlaySound(SelectSound, SLOT_None,1*Pawn(Owner).SoundDampening);
PlayAnim('Select',1,0.05);
FinishAnim();
}
}
GoToState('Idle');
 
Finish();
  // If we have a boost ready and we're not currently using it
if (BoostCount > 0 && !bBoost)
{
    BoostRechargeCounter=0;
  PlaySound(BoostSound, SLOT_Misc, 128,,,64); //Boost sound Pitch 160
bBoost = true;
BoostCount--;
}
}
 
 
simulated event Timer()
{
// when boost time exceeds time limit, turn it off and disable the primed detonator
bBoost = false;
bPrimed = false;
EnableAfterburners(bBoost);
}
}
</uscript>


<uscript>
//
//=============================================================================
simulated function EnableAfterburners(bool bEnable)
// OWshotgun.
{
// fully remade from an older project to work as an objective weapon.
// Don't bother on dedicated server, this controls graphics only
//=============================================================================
if(Level.NetMode != NM_DedicatedServer)
class OWshotgun expands OWWeapon;
{
//Because we want the trail emitters to look right (proper team color and not strangely angled at startup) we need to create our emitters every time we boost
    if (bEnable)
    {
      // Create boosting emitters.
  Afterburner[0] = spawn(AfterburnerClass[Team], self,, Location + (AfterburnerOffset[0] >> Rotation) );
  Afterburner[0].SetBase(self);
  Afterburner[0].SetRelativeRotation(AfterburnerRotOffset[0]);
 
  Afterburner[1] = spawn(AfterburnerClass[Team], self,, Location + (AfterburnerOffset[1] >> Rotation) );
  Afterburner[1].SetBase(self);
  Afterburner[1].SetRelativeRotation(AfterburnerRotOffset[1]);
    }
    else
    {
      if (Afterburner[0] != none)
          Afterburner[0].Destroy();
      if (Afterburner[1] != none)
      Afterburner[1].Destroy();
    }
}
 
bAfterburnersOn = bEnable; // update state of afterburners
}


// copied from olweapons.u - kinda fixes third person mesh
#exec MESH IMPORT MESH=QuadShotthird ANIVFILE=MODELS\QuadShotPickup_a.3D DATAFILE=MODELS\QuadShotPickup_d.3D X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=QuadShotthird X=-164 Y=0 Z=70 YAW=64 Pitch=-7
#exec MESH SEQUENCE MESH=QuadShotthird SEQ=All  STARTFRAME=0  NUMFRAMES=1
#exec MESHMAP SCALE MESHMAP=QuadShotthird X=0.02 Y=0.02 Z=0.04
#exec MESHMAP SETTEXTURE MESHMAP=QuadShotthird NUM=4 TEXTURE=GunPick1
// also copied from olweapons. fixes first-person model bugs
#exec MESH IMPORT MESH=QuadShotHeldr ANIVFILE=MODELS\QuadShotHeld_a.3D DATAFILE=MODELS\QuadShotHeld_d.3D
#exec MESH ORIGIN MESH=QuadShotHeldr X=0 Y=0 Z=0 YAW=128
#exec MESH SEQUENCE MESH=QuadShotHeldr SEQ=still STARTFRAME=29  NUMFRAMES=1
#exec MESH SEQUENCE MESH=QuadShotHeldr SEQ=stillfire STARTFRAME=0  NUMFRAMES=1
#exec MESH SEQUENCE MESH=QuadShotHeldr SEQ=all  STARTFRAME=0  NUMFRAMES=30
#exec MESH SEQUENCE MESH=QuadShotHeldr SEQ=fire STARTFRAME=0  NUMFRAMES=9
#exec MESH SEQUENCE MESH=QuadShotHeldr SEQ=reload STARTFRAME=8  NUMFRAMES=21  Rate=24
#exec MESH SEQUENCE MESH=QuadShotHeldr SEQ=select STARTFRAME=25  NUMFRAMES=5  Rate=8 GROUP=Select
#exec MESH SEQUENCE MESH=QuadShotHeldr SEQ=down STARTFRAME=8  NUMFRAMES=6 Rate=20
#exec MESHMAP SCALE MESHMAP=QuadShotHeldr X=0.01 Y=0.01 Z=0.02


var float clipb; // why a float? to use for volume of shoot sound.
function Died(Controller Killer, class<DamageType> damageType, vector HitLocation)
var byte shots;
{
var byte clipstore;
    if (Level.NetMode != NM_DedicatedServer)
  {
    if (Afterburner[0] != none)
          Afterburner[0].Destroy();
      if (Afterburner[1] != none)
      Afterburner[1].Destroy();
    }


////////////////////////////////////////////////////////
Super.Died(Killer, damageType, HitLocation);
state shoot {
ignores fire, altfire, reload;
Begin:
clipstore = clip;
GoToState('altshoot');
Finish();
}
}


state altshoot {
 
ignores fire, altfire, reload;
simulated function Destroyed()
Begin:
{
CheckVisibility(); // no idea what this stuff does... perhaps chop it out?
    if (Level.NetMode != NM_DedicatedServer)
bPointing=True;
  {
Owner.MakeNoise(2*Pawn(Owner).SoundDampening);
  if (Afterburner[0] != none)
if (PlayerPawn(Owner) != None) {
          Afterburner[0].Destroy();
PlayerPawn(Owner).ClientInstantFlash(-0.4, vect(650, 450, 190));
      if (Afterburner[1] != none)
PlayerPawn(Owner).ShakeView(ShakeTime, ShakeMag, ShakeVert);
      Afterburner[1].Destroy();
    }
 
    Super.Destroyed();
}
 
 
simulated function Tick(float DT)
{
  //If bAfterburnersOn and boost state don't agree
  if (bBoost != bAfterburnersOn)
  {
  // it means we need to change the state of the vehicle (bAfterburnersOn)
  // to match the desired state (bBoost)
    EnableAfterburners(bBoost); // show/hide afterburner smoke
 
  // if we just enabled afterburners, set the timer
  // to turn them off after set time has expired
  if (bBoost)
  {
      SetTimer(BoostTime, false);
    }
}
if (Role == ROLE_Authority)
{
  // Afterburners recharge after the change in time exceeds the specified charge duration
  BoostRechargeCounter+=DT;
  if (BoostRechargeCounter > BoostRechargeTime)
  {
      if (BoostCount < 1)
      {
          BoostCount++;
          PlaySound(BoostReadySound, SLOT_Misc,128);
        }
        BoostRechargeCounter = 0;
  }
}
}
if (clipstore>1) clip=1;
 
for(clipb=0;clipb<clip;clipb+=1) {
  Super.Tick(DT);
for(shots=0;shots<7;shots++) TraceFire(acc);
fireeffects(); 
}
clipb = clip;
Owner.PlaySound(FireSound,SLOT_None,clipb);
PlayAnim( 'Fire', 1, 0.05);
dorecoil((recoil*(1+(clip/2)))); // do recoil depending on barrels fired
clip = clipstore-1;
if (clip>clipmax) clip=0; // fix wraparound bug
clipstore = 0;
sleep(60/rpm);
GoToState('Idle');
Finish();
}
}


state reloading {
 
ignores fire, altfire, reload;
simulated event KApplyForce(out vector Force, out vector Torque)
Begin:
{
if (AmmoType.UseAmmo(1) && clip<clipmax) {
Super.KApplyForce(Force, Torque); // apply other forces first
PlayAnim( 'Reload', 1.05, 0.05);
 
Owner.PlaySound(CockingSound,SLOT_None,1*Pawn(Owner).SoundDampening);
if(bBoost && bVehicleOnGround)
clip++;
{
FinishAnim();
    Force += vector(Rotation); // get direction of vehicle
GoToState('idle');
Force += Normal(Force) * BoostForce; // apply force in that direction
}
}
Finish();
}
 
 
simulated function float ChargeBar()
{
    if (BoostCount != 1)
      return FClamp(BoostRechargeCounter/BoostRechargeTime, 0.0, 0.999);
    else
      return 0.999;
}
 
 
function KDriverEnter(Pawn P)
{
  Super.KDriverEnter(P);
 
//Handle ejection stuff
  if (P.ShieldStrength >= 50)
    bEjectDriver=true;
  else
    bEjectDriver=false;
   
  //Store the driver in case he bails before we self-destruct
  OriginalDriver = P;
 
}
 
function DriverLeft()
{
  //Reset driver ejection
  bEjectDriver=false;
  Super.DriverLeft();
}
 
 
// event called when Karmic actor hits with impact velocity over KImpactThreshold
// Used for handling self-destruct boost
event KImpact(actor other, vector pos, vector impactVel, vector impactNorm)
{
  Super.KImpact(Other, Pos, ImpactVel, ImpactNorm);
 
  if (bPrimed && VSize(impactVel) > 500)
  {
      SuperEjectDriver();
      ScorpionSelfDestruct(Other);
  }
}
 
/*
UT2004 Build UT2004_Build_[2005-11-23_16.22]
 
OS: Windows XP 5.1 (Build: 2600)
CPU: GenuineIntel Unknown processor @ 3004 MHz with 2047MB RAM
Video: NVIDIA GeForce 8800 GT (6906)
 
General protection fault!
 
History: KHandleCollisions <- KUpdateContacts <- KTickLevelKarma <- TickAllActors <- ULevel::Tick <- (NetMode=0) <- TickLevel <- UGameEngine::Tick <- Level Tricky <- UpdateWorld <- MainLoop <- FMallocWindows::Free <- FMallocWindows::Realloc <- 10910191 0 FArray <- FArray::Realloc <- 0*2 <- FMallocWindows::Free
 
 
UT2004 Build UT2004_Build_[2005-11-23_16.22]
 
OS: Windows XP 5.1 (Build: 2600)
CPU: GenuineIntel Unknown processor @ 3004 MHz with 2047MB RAM
Video: NVIDIA GeForce 8800 GT (6906)
 
General protection fault!
 
History: KHandleCollisions <- KUpdateContacts <- KTickLevelKarma <- TickAllActors <- ULevel::Tick <- (NetMode=0) <- TickLevel <- UGameEngine::Tick <- Level Stygian-32p-RC1a <- UpdateWorld <- MainLoop <- FMallocWindows::Free <- FMallocWindows::Realloc <- 10910191 0 FArray <- FArray::Realloc <- 0*2 <- FMallocWindows::Free
 
 
UT2004 Build UT2004_Build_[2005-11-23_16.22]
 
OS: Windows XP 5.1 (Build: 2600)
CPU: GenuineIntel Unknown processor @ 3004 MHz with 2047MB RAM
Video: NVIDIA GeForce 8800 GT (6906)
 
General protection fault!
 
History: CopyContacts <- KHandleCollisions <- KUpdateContacts <- KTickLevelKarma <- TickAllActors <- ULevel::Tick <- (NetMode=0) <- TickLevel <- UGameEngine::Tick <- Level Stygian-32p-RC1a <- UpdateWorld <- MainLoop <- FMallocWindows::Free <- FMallocWindows::Realloc <- 10910191 0 FArray <- FArray::Realloc <- 0*2 <- FMallocWindows::Free
 
 
UT2004 Build UT2004_Build_[2005-11-23_16.22]
 
OS: Windows XP 5.1 (Build: 2600)
CPU: GenuineIntel Unknown processor @ 3004 MHz with 2047MB RAM
Video: NVIDIA GeForce 8800 GT (6906)
 
General protection fault!
 
History: KPerContactCB <- CopyContacts <- KHandleCollisions <- KUpdateContacts <- KTickLevelKarma <- TickAllActors <- ULevel::Tick <- (NetMode=0) <- TickLevel <- UGameEngine::Tick <- Level Stygian-32p-RC1a <- UpdateWorld <- MainLoop <- FMallocWindows::Free <- FMallocWindows::Realloc <- 10910191 0 FArray <- FArray::Realloc <- 0*2 <- FMallocWindows::Free
 
*/
 
 
function SuperEjectDriver()
{
    local Pawn      OldPawn;
    local vector    EjectVel;
    local EONSScorpionSelfDestructInv Inv;
    local EONSScorpionEjectionInv Inv2;
 
    OldPawn = Driver;
 
    KDriverLeave( true );
 
    if ( OldPawn == None )
        return;
 
    EjectVel    = VRand();
    EjectVel.Z  = 0;
    EjectVel    = (Normal(EjectVel)*0.2 + Vect(0,0,1)) * EjectMomentum;
 
    OldPawn.Velocity = EjectVel;
 
    //Create our inventory items to absorb the self-destruct damage and some falling damage
    Inv = spawn(class'EONSScorpionSelfDestructInv', OldPawn,,, rot(0,0,0));
    Inv.GiveTo(OldPawn);
    Inv2 = spawn(class'EONSScorpionEjectionInv', OldPawn,,, rot(0,0,0));
    Inv2.GiveTo(OldPawn);
 
 
    OldPawn.SpawnTime = Level.TimeSeconds;
    OldPawn.PlayTeleportEffect( false, false);
}
 
function ScorpionSelfDestruct(optional Actor Target)
{
  local Pawn DamageDoer;
 
if (Driver != None)
  DamageDoer = Driver;
else
  DamageDoer = OriginalDriver;
 
// apply damage to hit vehicle
if (SVehicle(Target) != None)
{
  Target.TakeDamage(SelfDestructDamage, DamageDoer, Location, vect(0,0,0), SelfDestructDamageType);
      //HurtRadius(SelfDestructDamage, SelfDestructDamageRadius, SelfDestructDamageType, SelfDestructMomentum, Location);
  Self.TakeDamage(SelfDestructDamage, DamageDoer, Location, vect(0,0,0), SelfDestructDamageType);
}
// We we've hit another actor, but NOT a player (just run players over)
else if(Target != None && xPawn(Target) == None)
{
      Target.TakeDamage(SelfDestructDamage, DamageDoer, Location, vect(0,0,0), SelfDestructDamageType);
      //HurtRadius(SelfDestructDamage, SelfDestructDamageRadius, SelfDestructDamageType, SelfDestructMomentum, Location);
  Self.TakeDamage(SelfDestructDamage, DamageDoer, Location, vect(0,0,0), SelfDestructDamageType);
}
// If we're just exploding, not hitting anything
else if(Target == None)
{
  Target.TakeDamage(SelfDestructDamage, DamageDoer, Location, vect(0,0,0), SelfDestructDamageType);
      //HurtRadius(SelfDestructDamage, SelfDestructDamageRadius, SelfDestructDamageType, SelfDestructMomentum, Location);
  Self.TakeDamage(SelfDestructDamage, DamageDoer, Location, vect(0,0,0), SelfDestructDamageType);
}
 
  //Log("We hit: "$Other);
  //HurtRadius(SelfDestructDamage, SelfDestructDamageRadius, SelfDestructDamageType, SelfDestructMomentum, Location);
  //if (Pawn(Other) != none)
  //  Log("Pawn(Other) Health: "$Pawn(Other).Health);
  //Self.TakeDamage(SelfDestructDamage, Driver, Location, vect(0,0,0), SelfDestructDamageType);
}
 
 
 
defaultproperties
{
    Mesh=Mesh'ONSVehicles-A.RV'
    VehiclePositionString="in an EONS Scorpion"
    VehicleNameString="EONS Scorpion"
    bReplicateAnimations=True
 
    RedSkin=Shader'VMVehicles-TX.RVGroup.RVChassisFinalRED'
    BlueSkin=Shader'VMVehicles-TX.RVGroup.RVChassisFinalBLUE'
 
    DriverWeapons(0)=(WeaponClass=Class'EONSScorpionProjectileLauncher',WeaponBone="ChainGunAttachment")
    bHasAltFire=False
 
    bShowChargingBar=true
    BoostForce=1600.000000 //2000
    BoostTime=2.000000
    BoostCount=1
    BoostSound=Sound'AssaultSounds.SkShipAccel01'
    BoostReadySound=Sound'AssaultSounds.HnShipFireReadyl01'
    BoostRechargeTime=8.000000
   
    SelfDestructDamage=400
    SelfDestructDamageRadius=750
    SelfDestructDamageType=class'DamTypeEONSScorpionSelfDestruct'
    SelfDestructMomentum=20000
 
 
    AfterburnerClass(0)=class'EONSScorpionBoostTrailEmitterRed'
    AfterburnerClass(1)=class'EONSScorpionBoostTrailEmitterBlue'
    AfterburnerOffset(0)=(X=-110.000000,Y=-21.000000,Z=-1.000000)
    AfterburnerOffset(1)=(X=-110.000000,Y=21.000000,Z=-1.000000)
    AfterburnerRotOffset(0)=(Yaw=32768)
    AfterburnerRotOffset(1)=(Yaw=32768)
 
    DestroyedVehicleMesh=StaticMesh'ONSDeadVehicles-SM.RVDead'
    DestructionEffectClass=class'Onslaught.ONSSmallVehicleExplosionEffect'
    DisintegrationEffectClass=class'Onslaught.ONSVehDeathRV'
    DestructionLinearMomentum=(Min=200000,Max=300000)
    DestructionAngularMomentum=(Min=100,Max=150)
    DisintegrationHealth=-25
    ImpactDamageMult=0.0010
 
    Health=300
    HealthMax=300
    CollisionHeight=+40.0
    CollisionRadius=+100.0
    DriverDamageMult=0.20
    bSeparateTurretFocus=true
    RanOverDamageType=class'DamTypeEONSScorpionRoadkill'
    CrushedDamageType=class'DamTypeEONSScorpionPancake'
 
    DrawScale=1.0
    DrawScale3D=(X=1.0,Y=1.0,Z=1.0)
 
    FPCamPos=(X=15,Y=0,Z=25)
    TPCamLookat=(X=0,Y=0,Z=0)
    TPCamWorldOffset=(X=0,Y=0,Z=100)
    TPCamDistance=375
 
    bDoStuntInfo=true
    bAllowAirControl=True
    DaredevilThreshInAirSpin=100.0
    DaredevilThreshInAirPitch=300.0
    DaredevilThreshInAirRoll=300.0
    DaredevilThreshInAirTime=1.7
    DaredevilThreshInAirDistance=25.0
 
    AirTurnTorque=35.0
    AirPitchTorque=55.0
    AirPitchDamping=55.0
    AirRollTorque=35.0
    AirRollDamping=35.0
 
    bDrawDriverInTP=true
    bDrawMeshInFP=true
    bHasHandbrake=true
    bAllowBigWheels=true
 
    DrivePos=(X=2.0,Y=0.0,Z=38.0)
 
    MaxViewYaw=16000
    MaxViewPitch=16000
 
    IdleSound=sound'ONSVehicleSounds-S.RV.RVEng01'
    StartUpSound=sound'ONSVehicleSounds-S.RV.RVStart01'
    ShutDownSound=sound'ONSVehicleSounds-S.RV.RVStop01'
    EngineRPMSoundRange=9000
    SoundVolume=180
    IdleRPM=500
    RevMeterScale=4000
 
    StartUpForce="RVStartUp"
 
    SteerBoneName="SteeringWheel"
    SteerBoneAxis=AXIS_Z
    SteerBoneMaxAngle=90
 
    EntryPosition=(X=0,Y=0,Z=0)
    EntryRadius=160.0
 
    ExitPositions(0)=(X=0,Y=-165,Z=100)
    ExitPositions(1)=(X=0,Y=165,Z=100)
    ExitPositions(2)=(X=0,Y=-165,Z=-100)
    ExitPositions(3)=(X=0,Y=165,Z=-100)
 
    HeadlightCoronaOffset(0)=(X=86,Y=30,Z=7)
    HeadlightCoronaOffset(1)=(X=86,Y=-30,Z=7)
    HeadlightCoronaMaterial=Material'EpicParticles.flashflare1'
    HeadlightCoronaMaxSize=65
 
    bMakeBrakeLights=true
    BrakeLightOffset(0)=(X=-100,Y=23,Z=7)
    BrakeLightOffset(1)=(X=-100,Y=-23,Z=7)
    BrakeLightMaterial=Material'EpicParticles.flashflare1'
 
    HeadlightProjectorOffset=(X=90,Y=0,Z=7)
    HeadlightProjectorRotation=(Yaw=0,Pitch=-1000,Roll=0)
    HeadlightProjectorMaterial=Texture'VMVehicles-TX.RVGroup.RVProjector'
    HeadlightProjectorScale=0.3
 
    DamagedEffectOffset=(X=60,Y=10,Z=10)
    DamagedEffectScale=1.0
 
    WheelPenScale=1.2
    WheelPenOffset=0.01
    WheelSoftness=0.025
    WheelRestitution=0.1
    WheelAdhesion=0.05  //0.01
    WheelLongFrictionFunc=(Points=((InVal=0,OutVal=0.0),(InVal=100.0,OutVal=1.0),(InVal=200.0,OutVal=0.9),(InVal=10000000000.0,OutVal=0.9)))
    WheelLongFrictionScale=1.1
    WheelLatFrictionScale=1.35
    WheelLongSlip=0.001
    WheelLatSlipFunc=(Points=((InVal=0.0,OutVal=0.0),(InVal=30.0,OutVal=0.009),(InVal=45.0,OutVal=0.00),(InVal=10000000000.0,OutVal=0.00)))
    WheelHandbrakeSlip=0.01
    WheelHandbrakeFriction=0.1
    WheelSuspensionTravel=15.0
    WheelSuspensionOffset=0.0
    WheelSuspensionMaxRenderTravel=15.0
    TurnDamping=35
 
    HandbrakeThresh=200
    FTScale=0.03
    ChassisTorqueScale=0.4
 
    MinBrakeFriction=4.0
    MaxBrakeTorque=25.0  //20
    MaxSteerAngleCurve=(Points=((InVal=0,OutVal=25.0),(InVal=1500.0,OutVal=11.0),(InVal=1000000000.0,OutVal=11.0)))
    SteerSpeed=200    //160
    StopThreshold=100
    TorqueCurve=(Points=((InVal=0,OutVal=9.0),(InVal=200,OutVal=10.0),(InVal=1500,OutVal=11.0),(InVal=2800,OutVal=0.0)))
    EngineBrakeFactor=0.0001
    EngineBrakeRPMScale=0.1
    EngineInertia=0.1
    WheelInertia=0.1
 
    TransRatio=0.15
    GearRatios[0]=-0.5  //-.5
    GearRatios[1]=0.5  //.4
    GearRatios[2]=0.65  //0.65
    GearRatios[3]=0.85  //0.85
    GearRatios[4]=1.1  //1.1
    ChangeUpPoint=2000
    ChangeDownPoint=1000
    LSDFactor=1.0
 
    VehicleMass=5.5
 
    Begin Object Class=KarmaParamsRBFull Name=KParams0
        KStartEnabled=True
        KFriction=0.5
        KLinearDamping=0.05
        KAngularDamping=0.05
        KImpactThreshold=700
        bKNonSphericalInertia=True
        bHighDetailOnly=False
        bClientOnly=False
        bKDoubleTickRate=True
        KInertiaTensor(0)=1.0
        KInertiaTensor(1)=0.0
        KInertiaTensor(2)=0.0
        KInertiaTensor(3)=3.0
        KInertiaTensor(4)=0.0
        KInertiaTensor(5)=3.0
        KCOMOffset=(X=-0.25,Y=0.0,Z=-0.4)
        bDestroyOnWorldPenetrate=True
        bDoSafetime=True
        Name="KParams0"
    End Object
    KParams=KarmaParams'KParams0'
 
    Begin Object Class=SVehicleWheel Name=RRWheel
        BoneName="tire02"
        BoneRollAxis=AXIS_Y
        BoneSteerAxis=AXIS_Z
        BoneOffset=(X=0.0,Y=7.0,Z=0.0)
        WheelRadius=24
        bPoweredWheel=True
        bHandbrakeWheel=True
        SteerType=VST_Fixed
        SupportBoneAxis=AXIS_X
        SupportBoneName="RRearStrut"
    End Object
    Wheels(0)=SVehicleWheel'RRWheel'
 
    Begin Object Class=SVehicleWheel Name=LRWheel
        BoneName="tire04"
        BoneRollAxis=AXIS_Y
        BoneSteerAxis=AXIS_Z
        BoneOffset=(X=0.0,Y=-7.0,Z=0.0)
        WheelRadius=24
        bPoweredWheel=True
        bHandbrakeWheel=True
        SteerType=VST_Fixed
        SupportBoneAxis=AXIS_X
        SupportBoneName="LRearStrut"
    End Object
    Wheels(1)=SVehicleWheel'LRWheel'
 
    Begin Object Class=SVehicleWheel Name=RFWheel
        BoneName="tire"
        BoneRollAxis=AXIS_Y
        BoneSteerAxis=AXIS_Z
        BoneOffset=(X=0.0,Y=7.0,Z=0.0)
        WheelRadius=24
        bPoweredWheel=True
        SteerType=VST_Steered
        SupportBoneAxis=AXIS_X
        SupportBoneName="RFrontStrut"
    End Object
    Wheels(2)=SVehicleWheel'RFWheel'
 
    Begin Object Class=SVehicleWheel Name=LFWheel
        BoneName="tire03"
        BoneRollAxis=AXIS_Y
        BoneSteerAxis=AXIS_Z
        BoneOffset=(X=0.0,Y=-7.0,Z=0.0)
        WheelRadius=24
        bPoweredWheel=True
        SteerType=VST_Steered
        SupportBoneAxis=AXIS_X
        SupportBoneName="LFrontStrut"
    End Object
    Wheels(3)=SVehicleWheel'LFWheel'
 
    GroundSpeed=940.0000
    CenterSpringForce="SpringONSSRV"
 
    HornSounds(0)=sound'ONSVehicleSounds-S.Horn06'
    HornSounds(1)=sound'ONSVehicleSounds-S.Dixie_Horn'
 
    MaxDesireability=0.4
    ObjectiveGetOutDist=1500.0
    bCanDoTrickJumps=true
}
}
</uscript>
</uscript>

Revision as of 02:46, 1 June 2008

This page is for pasting code you want to show someone as an example or to get assistance with. This allows you to easily collaborate with someone to solve a problem, and allows easy comparisons of the edits.

You are free to remove any existing code from below, and paste your code between the <uscript> </uscript> tags. If the page hasn't been edited in the last few hours (the last edit timestamp is 2008-06-01 02:46:35), you can assume it isn't needed anymore and can be removed. A full edit history will be available, so don't worry about losing anything you removed.


Taehl's Objective Weapons mod-in-progress:

class EONSScorpion extends ONSRV;

var () class<Emitter>	AfterburnerClass[2];
var Emitter				Afterburner[2];
var () Vector			AfterburnerOffset[2];
var () Rotator		AfterburnerRotOffset[2];
var bool				  bAfterburnersOn;

var bool  bBoost;         //Boost functionality
var float BoostForce;
var float BoostTime;
var int   BoostCount;
var Sound BoostSound, BoostReadySound;
var float BoostRechargeTime;
var float BoostRechargeCounter;
var bool bPrimed;        //When the detonator is primed, collisions cause the vehicle to explode

var int SelfDestructDamage;
var int SelfDestructDamageRadius;
var class<DamageType> SelfDestructDamageType;
var int SelfDestructMomentum;

var Pawn OriginalDriver;


replication
{
  reliable if(Role==ROLE_Authority)
     bBoost, bPrimed, BoostCount, BoostRechargeCounter, OriginalDriver;
}


simulated function PostNetBeginPlay()
{
	Super(ONSWheeledCraft).PostNetBeginPlay();
}


function TakeDamage(int Damage, Pawn instigatedBy, Vector Hitlocation, Vector Momentum, class<DamageType> DamageType)
{
  if ( (ClassIsChildOf(DamageType, class'DamTypeShockBeam')) || (ClassIsChildOf(DamageType, class'DamTypeONSMine')) )
     Damage *= 0.8;
  Momentum *= 0.35;

  if (bBoost && instigatedBy != none && instigatedBy != self)
     Damage *= 2;

  Super.TakeDamage(Damage, instigatedBy, Hitlocation, Momentum, damageType);
}


function ChooseFireAt(Actor A)
{
	Fire(0);
}


function AltFire(optional float F)
{
	Super(ONSWheeledCraft).AltFire(F);
}


function ClientVehicleCeaseFire(bool bWasAltFire)
{
	Super(ONSWheeledCraft).ClientVehicleCeaseFire(bWasAltFire);
}


function VehicleFire(bool bWasAltFire)
{
	if(bWasAltFire)
	{
		Boost();
	}

  Super(ONSWheeledCraft).VehicleFire(bWasAltFire);
}


function VehicleCeaseFire(bool bWasAltFire)
{
	Super(ONSWheeledCraft).VehicleCeaseFire(bWasAltFire);
}


function Boost()
{
	//If we're already boosting, then prime the detonator
	if (bBoost)
	{
	  bPrimed = true;
	  PlaySound(BoostReadySound, SLOT_Misc, 128,,,160);
	}

  // If we have a boost ready and we're not currently using it
	if (BoostCount > 0 && !bBoost)
	{
    BoostRechargeCounter=0;
	  PlaySound(BoostSound, SLOT_Misc, 128,,,64); //Boost sound Pitch 160
		bBoost = true;
		BoostCount--;
	}
}


simulated event Timer()
{
	// when boost time exceeds time limit, turn it off and disable the primed detonator
	bBoost = false;
	bPrimed = false;
	EnableAfterburners(bBoost);
}

//
simulated function EnableAfterburners(bool bEnable)
{
	// Don't bother on dedicated server, this controls graphics only
	if(Level.NetMode != NM_DedicatedServer)
	{
		//Because we want the trail emitters to look right (proper team color and not strangely angled at startup) we need to create our emitters every time we boost
    if (bEnable)
    {
       // Create boosting emitters.
		   Afterburner[0] = spawn(AfterburnerClass[Team], self,, Location + (AfterburnerOffset[0] >> Rotation) );
		   Afterburner[0].SetBase(self);
		   Afterburner[0].SetRelativeRotation(AfterburnerRotOffset[0]);

		   Afterburner[1] = spawn(AfterburnerClass[Team], self,, Location + (AfterburnerOffset[1] >> Rotation) );
		   Afterburner[1].SetBase(self);
		   Afterburner[1].SetRelativeRotation(AfterburnerRotOffset[1]);
    }
    else
    {
       if (Afterburner[0] != none)
          Afterburner[0].Destroy();
       if (Afterburner[1] != none)
		      Afterburner[1].Destroy();
    }
	}

	bAfterburnersOn = bEnable; // update state of afterburners
}


function Died(Controller Killer, class<DamageType> damageType, vector HitLocation)
{
    if (Level.NetMode != NM_DedicatedServer)
	  {
	     if (Afterburner[0] != none)
          Afterburner[0].Destroy();
       if (Afterburner[1] != none)
		      Afterburner[1].Destroy();
    }

	Super.Died(Killer, damageType, HitLocation);
}


simulated function Destroyed()
{
    if (Level.NetMode != NM_DedicatedServer)
	  {
		   if (Afterburner[0] != none)
          Afterburner[0].Destroy();
       if (Afterburner[1] != none)
		      Afterburner[1].Destroy();
    }

    Super.Destroyed();
}


simulated function Tick(float DT)
{
  //If bAfterburnersOn and boost state don't agree
  if (bBoost != bAfterburnersOn)
  {
	   // it means we need to change the state of the vehicle (bAfterburnersOn)
	   // to match the desired state (bBoost)
     EnableAfterburners(bBoost); // show/hide afterburner smoke

	   // if we just enabled afterburners, set the timer
	   // to turn them off after set time has expired
	   if (bBoost)
	   {
	      SetTimer(BoostTime, false);
     }
	}
	
	if (Role == ROLE_Authority)
	{
	   // Afterburners recharge after the change in time exceeds the specified charge duration
	   BoostRechargeCounter+=DT;
	   if (BoostRechargeCounter > BoostRechargeTime)
	   {
	      if (BoostCount < 1)
	      {
           BoostCount++;
           PlaySound(BoostReadySound, SLOT_Misc,128);
        }
        BoostRechargeCounter = 0;
	   }
	}

  Super.Tick(DT);
}


simulated event KApplyForce(out vector Force, out vector Torque)
{
	Super.KApplyForce(Force, Torque); // apply other forces first

	if(bBoost && bVehicleOnGround)
	{
    Force += vector(Rotation); // get direction of vehicle
		Force += Normal(Force) * BoostForce; // apply force in that direction
	}
}


simulated function float ChargeBar()
{
    if (BoostCount != 1)
       return FClamp(BoostRechargeCounter/BoostRechargeTime, 0.0, 0.999);
    else
       return 0.999;
}


function KDriverEnter(Pawn P)
{
  Super.KDriverEnter(P);

	//Handle ejection stuff
  if (P.ShieldStrength >= 50)
     bEjectDriver=true;
  else
     bEjectDriver=false;
     
  //Store the driver in case he bails before we self-destruct
  OriginalDriver = P;

}

function DriverLeft()
{
  //Reset driver ejection
  bEjectDriver=false;
  Super.DriverLeft();
}


// event called when Karmic actor hits with impact velocity over KImpactThreshold
// Used for handling self-destruct boost
event KImpact(actor other, vector pos, vector impactVel, vector impactNorm)
{
   Super.KImpact(Other, Pos, ImpactVel, ImpactNorm);

   if (bPrimed && VSize(impactVel) > 500)
   {
      SuperEjectDriver();
      ScorpionSelfDestruct(Other);
   }
}

/*
UT2004 Build UT2004_Build_[2005-11-23_16.22]

OS: Windows XP 5.1 (Build: 2600)
CPU: GenuineIntel Unknown processor @ 3004 MHz with 2047MB RAM
Video: NVIDIA GeForce 8800 GT (6906)

General protection fault!

History: KHandleCollisions <- KUpdateContacts <- KTickLevelKarma <- TickAllActors <- ULevel::Tick <- (NetMode=0) <- TickLevel <- UGameEngine::Tick <- Level Tricky <- UpdateWorld <- MainLoop <- FMallocWindows::Free <- FMallocWindows::Realloc <- 10910191 0 FArray <- FArray::Realloc <- 0*2 <- FMallocWindows::Free


UT2004 Build UT2004_Build_[2005-11-23_16.22]

OS: Windows XP 5.1 (Build: 2600)
CPU: GenuineIntel Unknown processor @ 3004 MHz with 2047MB RAM
Video: NVIDIA GeForce 8800 GT (6906)

General protection fault!

History: KHandleCollisions <- KUpdateContacts <- KTickLevelKarma <- TickAllActors <- ULevel::Tick <- (NetMode=0) <- TickLevel <- UGameEngine::Tick <- Level Stygian-32p-RC1a <- UpdateWorld <- MainLoop <- FMallocWindows::Free <- FMallocWindows::Realloc <- 10910191 0 FArray <- FArray::Realloc <- 0*2 <- FMallocWindows::Free


UT2004 Build UT2004_Build_[2005-11-23_16.22]

OS: Windows XP 5.1 (Build: 2600)
CPU: GenuineIntel Unknown processor @ 3004 MHz with 2047MB RAM
Video: NVIDIA GeForce 8800 GT (6906)

General protection fault!

History: CopyContacts <- KHandleCollisions <- KUpdateContacts <- KTickLevelKarma <- TickAllActors <- ULevel::Tick <- (NetMode=0) <- TickLevel <- UGameEngine::Tick <- Level Stygian-32p-RC1a <- UpdateWorld <- MainLoop <- FMallocWindows::Free <- FMallocWindows::Realloc <- 10910191 0 FArray <- FArray::Realloc <- 0*2 <- FMallocWindows::Free


UT2004 Build UT2004_Build_[2005-11-23_16.22]

OS: Windows XP 5.1 (Build: 2600)
CPU: GenuineIntel Unknown processor @ 3004 MHz with 2047MB RAM
Video: NVIDIA GeForce 8800 GT (6906)

General protection fault!

History: KPerContactCB <- CopyContacts <- KHandleCollisions <- KUpdateContacts <- KTickLevelKarma <- TickAllActors <- ULevel::Tick <- (NetMode=0) <- TickLevel <- UGameEngine::Tick <- Level Stygian-32p-RC1a <- UpdateWorld <- MainLoop <- FMallocWindows::Free <- FMallocWindows::Realloc <- 10910191 0 FArray <- FArray::Realloc <- 0*2 <- FMallocWindows::Free

*/


function SuperEjectDriver()
{
    local Pawn      OldPawn;
    local vector    EjectVel;
    local EONSScorpionSelfDestructInv Inv;
    local EONSScorpionEjectionInv Inv2;

    OldPawn = Driver;

    KDriverLeave( true );

    if ( OldPawn == None )
        return;

    EjectVel    = VRand();
    EjectVel.Z  = 0;
    EjectVel    = (Normal(EjectVel)*0.2 + Vect(0,0,1)) * EjectMomentum;

    OldPawn.Velocity = EjectVel;

    //Create our inventory items to absorb the self-destruct damage and some falling damage
    Inv = spawn(class'EONSScorpionSelfDestructInv', OldPawn,,, rot(0,0,0));
    Inv.GiveTo(OldPawn);
    Inv2 = spawn(class'EONSScorpionEjectionInv', OldPawn,,, rot(0,0,0));
    Inv2.GiveTo(OldPawn);


    OldPawn.SpawnTime = Level.TimeSeconds;
    OldPawn.PlayTeleportEffect( false, false);
}

function ScorpionSelfDestruct(optional Actor Target)
{
   local Pawn DamageDoer;

	 if (Driver != None)
		  DamageDoer = Driver;
	 else
		  DamageDoer = OriginalDriver;

	 // apply damage to hit vehicle
	 if (SVehicle(Target) != None)
	 {
		  Target.TakeDamage(SelfDestructDamage, DamageDoer, Location, vect(0,0,0), SelfDestructDamageType);
      //HurtRadius(SelfDestructDamage, SelfDestructDamageRadius, SelfDestructDamageType, SelfDestructMomentum, Location);
		  Self.TakeDamage(SelfDestructDamage, DamageDoer, Location, vect(0,0,0), SelfDestructDamageType);
	 }
	 // We we've hit another actor, but NOT a player (just run players over)
	 else if(Target != None && xPawn(Target) == None)
	 {
      Target.TakeDamage(SelfDestructDamage, DamageDoer, Location, vect(0,0,0), SelfDestructDamageType);
      //HurtRadius(SelfDestructDamage, SelfDestructDamageRadius, SelfDestructDamageType, SelfDestructMomentum, Location);
		  Self.TakeDamage(SelfDestructDamage, DamageDoer, Location, vect(0,0,0), SelfDestructDamageType);
	 }
	 // If we're just exploding, not hitting anything
	 else if(Target == None)
	 {
		  Target.TakeDamage(SelfDestructDamage, DamageDoer, Location, vect(0,0,0), SelfDestructDamageType);
      //HurtRadius(SelfDestructDamage, SelfDestructDamageRadius, SelfDestructDamageType, SelfDestructMomentum, Location);
		  Self.TakeDamage(SelfDestructDamage, DamageDoer, Location, vect(0,0,0), SelfDestructDamageType);
	 }

   //Log("We hit: "$Other);
   //HurtRadius(SelfDestructDamage, SelfDestructDamageRadius, SelfDestructDamageType, SelfDestructMomentum, Location);
   //if (Pawn(Other) != none)
   //   Log("Pawn(Other) Health: "$Pawn(Other).Health);
   //Self.TakeDamage(SelfDestructDamage, Driver, Location, vect(0,0,0), SelfDestructDamageType);
}



defaultproperties
{
    Mesh=Mesh'ONSVehicles-A.RV'
    VehiclePositionString="in an EONS Scorpion"
    VehicleNameString="EONS Scorpion"
    bReplicateAnimations=True

    RedSkin=Shader'VMVehicles-TX.RVGroup.RVChassisFinalRED'
    BlueSkin=Shader'VMVehicles-TX.RVGroup.RVChassisFinalBLUE'

    DriverWeapons(0)=(WeaponClass=Class'EONSScorpionProjectileLauncher',WeaponBone="ChainGunAttachment")
    bHasAltFire=False

    bShowChargingBar=true
    BoostForce=1600.000000 //2000
    BoostTime=2.000000
    BoostCount=1
    BoostSound=Sound'AssaultSounds.SkShipAccel01'
    BoostReadySound=Sound'AssaultSounds.HnShipFireReadyl01'
    BoostRechargeTime=8.000000
    
    SelfDestructDamage=400
    SelfDestructDamageRadius=750
    SelfDestructDamageType=class'DamTypeEONSScorpionSelfDestruct'
    SelfDestructMomentum=20000


    AfterburnerClass(0)=class'EONSScorpionBoostTrailEmitterRed'
    AfterburnerClass(1)=class'EONSScorpionBoostTrailEmitterBlue'
    AfterburnerOffset(0)=(X=-110.000000,Y=-21.000000,Z=-1.000000)
    AfterburnerOffset(1)=(X=-110.000000,Y=21.000000,Z=-1.000000)
    AfterburnerRotOffset(0)=(Yaw=32768)
    AfterburnerRotOffset(1)=(Yaw=32768)

    DestroyedVehicleMesh=StaticMesh'ONSDeadVehicles-SM.RVDead'
    DestructionEffectClass=class'Onslaught.ONSSmallVehicleExplosionEffect'
    DisintegrationEffectClass=class'Onslaught.ONSVehDeathRV'
    DestructionLinearMomentum=(Min=200000,Max=300000)
    DestructionAngularMomentum=(Min=100,Max=150)
    DisintegrationHealth=-25
    ImpactDamageMult=0.0010

    Health=300
    HealthMax=300
    CollisionHeight=+40.0
    CollisionRadius=+100.0
    DriverDamageMult=0.20
    bSeparateTurretFocus=true
    RanOverDamageType=class'DamTypeEONSScorpionRoadkill'
    CrushedDamageType=class'DamTypeEONSScorpionPancake'

    DrawScale=1.0
    DrawScale3D=(X=1.0,Y=1.0,Z=1.0)

    FPCamPos=(X=15,Y=0,Z=25)
    TPCamLookat=(X=0,Y=0,Z=0)
    TPCamWorldOffset=(X=0,Y=0,Z=100)
    TPCamDistance=375

    bDoStuntInfo=true
    bAllowAirControl=True
    DaredevilThreshInAirSpin=100.0
    DaredevilThreshInAirPitch=300.0
    DaredevilThreshInAirRoll=300.0
    DaredevilThreshInAirTime=1.7
    DaredevilThreshInAirDistance=25.0

    AirTurnTorque=35.0
    AirPitchTorque=55.0
    AirPitchDamping=55.0
    AirRollTorque=35.0
    AirRollDamping=35.0

    bDrawDriverInTP=true
    bDrawMeshInFP=true
    bHasHandbrake=true
    bAllowBigWheels=true

    DrivePos=(X=2.0,Y=0.0,Z=38.0)

    MaxViewYaw=16000
    MaxViewPitch=16000

    IdleSound=sound'ONSVehicleSounds-S.RV.RVEng01'
    StartUpSound=sound'ONSVehicleSounds-S.RV.RVStart01'
    ShutDownSound=sound'ONSVehicleSounds-S.RV.RVStop01'
    EngineRPMSoundRange=9000
    SoundVolume=180
    IdleRPM=500
    RevMeterScale=4000

    StartUpForce="RVStartUp"

    SteerBoneName="SteeringWheel"
    SteerBoneAxis=AXIS_Z
    SteerBoneMaxAngle=90

    EntryPosition=(X=0,Y=0,Z=0)
    EntryRadius=160.0

    ExitPositions(0)=(X=0,Y=-165,Z=100)
    ExitPositions(1)=(X=0,Y=165,Z=100)
    ExitPositions(2)=(X=0,Y=-165,Z=-100)
    ExitPositions(3)=(X=0,Y=165,Z=-100)

    HeadlightCoronaOffset(0)=(X=86,Y=30,Z=7)
    HeadlightCoronaOffset(1)=(X=86,Y=-30,Z=7)
    HeadlightCoronaMaterial=Material'EpicParticles.flashflare1'
    HeadlightCoronaMaxSize=65

    bMakeBrakeLights=true
    BrakeLightOffset(0)=(X=-100,Y=23,Z=7)
    BrakeLightOffset(1)=(X=-100,Y=-23,Z=7)
    BrakeLightMaterial=Material'EpicParticles.flashflare1'

    HeadlightProjectorOffset=(X=90,Y=0,Z=7)
    HeadlightProjectorRotation=(Yaw=0,Pitch=-1000,Roll=0)
    HeadlightProjectorMaterial=Texture'VMVehicles-TX.RVGroup.RVProjector'
    HeadlightProjectorScale=0.3

    DamagedEffectOffset=(X=60,Y=10,Z=10)
    DamagedEffectScale=1.0

    WheelPenScale=1.2
    WheelPenOffset=0.01
    WheelSoftness=0.025
    WheelRestitution=0.1
    WheelAdhesion=0.05  //0.01
    WheelLongFrictionFunc=(Points=((InVal=0,OutVal=0.0),(InVal=100.0,OutVal=1.0),(InVal=200.0,OutVal=0.9),(InVal=10000000000.0,OutVal=0.9)))
    WheelLongFrictionScale=1.1
    WheelLatFrictionScale=1.35
    WheelLongSlip=0.001
    WheelLatSlipFunc=(Points=((InVal=0.0,OutVal=0.0),(InVal=30.0,OutVal=0.009),(InVal=45.0,OutVal=0.00),(InVal=10000000000.0,OutVal=0.00)))
    WheelHandbrakeSlip=0.01
    WheelHandbrakeFriction=0.1
    WheelSuspensionTravel=15.0
    WheelSuspensionOffset=0.0
    WheelSuspensionMaxRenderTravel=15.0
    TurnDamping=35

    HandbrakeThresh=200
    FTScale=0.03
    ChassisTorqueScale=0.4

    MinBrakeFriction=4.0
    MaxBrakeTorque=25.0  //20
    MaxSteerAngleCurve=(Points=((InVal=0,OutVal=25.0),(InVal=1500.0,OutVal=11.0),(InVal=1000000000.0,OutVal=11.0)))
    SteerSpeed=200     //160
    StopThreshold=100
    TorqueCurve=(Points=((InVal=0,OutVal=9.0),(InVal=200,OutVal=10.0),(InVal=1500,OutVal=11.0),(InVal=2800,OutVal=0.0)))
    EngineBrakeFactor=0.0001
    EngineBrakeRPMScale=0.1
    EngineInertia=0.1
    WheelInertia=0.1

    TransRatio=0.15
    GearRatios[0]=-0.5  //-.5
    GearRatios[1]=0.5   //.4
    GearRatios[2]=0.65  //0.65
    GearRatios[3]=0.85  //0.85
    GearRatios[4]=1.1   //1.1
    ChangeUpPoint=2000
    ChangeDownPoint=1000
    LSDFactor=1.0

    VehicleMass=5.5

    Begin Object Class=KarmaParamsRBFull Name=KParams0
        KStartEnabled=True
        KFriction=0.5
        KLinearDamping=0.05
        KAngularDamping=0.05
        KImpactThreshold=700
        bKNonSphericalInertia=True
        bHighDetailOnly=False
        bClientOnly=False
        bKDoubleTickRate=True
        KInertiaTensor(0)=1.0
        KInertiaTensor(1)=0.0
        KInertiaTensor(2)=0.0
        KInertiaTensor(3)=3.0
        KInertiaTensor(4)=0.0
        KInertiaTensor(5)=3.0
        KCOMOffset=(X=-0.25,Y=0.0,Z=-0.4)
        bDestroyOnWorldPenetrate=True
        bDoSafetime=True
        Name="KParams0"
    End Object
    KParams=KarmaParams'KParams0'

    Begin Object Class=SVehicleWheel Name=RRWheel
        BoneName="tire02"
        BoneRollAxis=AXIS_Y
        BoneSteerAxis=AXIS_Z
        BoneOffset=(X=0.0,Y=7.0,Z=0.0)
        WheelRadius=24
        bPoweredWheel=True
        bHandbrakeWheel=True
        SteerType=VST_Fixed
        SupportBoneAxis=AXIS_X
        SupportBoneName="RRearStrut"
    End Object
    Wheels(0)=SVehicleWheel'RRWheel'

    Begin Object Class=SVehicleWheel Name=LRWheel
        BoneName="tire04"
        BoneRollAxis=AXIS_Y
        BoneSteerAxis=AXIS_Z
        BoneOffset=(X=0.0,Y=-7.0,Z=0.0)
        WheelRadius=24
        bPoweredWheel=True
        bHandbrakeWheel=True
        SteerType=VST_Fixed
        SupportBoneAxis=AXIS_X
        SupportBoneName="LRearStrut"
    End Object
    Wheels(1)=SVehicleWheel'LRWheel'

    Begin Object Class=SVehicleWheel Name=RFWheel
        BoneName="tire"
        BoneRollAxis=AXIS_Y
        BoneSteerAxis=AXIS_Z
        BoneOffset=(X=0.0,Y=7.0,Z=0.0)
        WheelRadius=24
        bPoweredWheel=True
        SteerType=VST_Steered
        SupportBoneAxis=AXIS_X
        SupportBoneName="RFrontStrut"
    End Object
    Wheels(2)=SVehicleWheel'RFWheel'

    Begin Object Class=SVehicleWheel Name=LFWheel
        BoneName="tire03"
        BoneRollAxis=AXIS_Y
        BoneSteerAxis=AXIS_Z
        BoneOffset=(X=0.0,Y=-7.0,Z=0.0)
        WheelRadius=24
        bPoweredWheel=True
        SteerType=VST_Steered
        SupportBoneAxis=AXIS_X
        SupportBoneName="LFrontStrut"
    End Object
    Wheels(3)=SVehicleWheel'LFWheel'

    GroundSpeed=940.0000
    CenterSpringForce="SpringONSSRV"

    HornSounds(0)=sound'ONSVehicleSounds-S.Horn06'
    HornSounds(1)=sound'ONSVehicleSounds-S.Dixie_Horn'

    MaxDesireability=0.4
    ObjectiveGetOutDist=1500.0
    bCanDoTrickJumps=true
}