| Home Page | Recent Changes

VecBooster

UT2004 :: Actor >> Trigger >> V2VecBooster (Package: custom) - works online.

by VitalOverdose

Part of Vital'sPMT

Overview

One of the main problems with the VecBooster is that a sudden kick scares any bot drivers and they instantly bail from the vehicle. One way around this is to use the property bDriverCannotLeaveVehicle to lock them inside the vehicle untiluntil they calm down a little.

//     class VecBooster
//
// kicks ANY Vehicle.
//
// By VitalOverdose
// optional vocal's(just remove sound to disable in unrealed)
// booster will boost the Vehicle in the direction hes facing
// unless the directional option is set to true
//-----------------------------------------------------------

class VecBooster extends Trigger
placeable;

Var() vector                      AppliedBoostForce;
var() sound                       VocBoost;
Var() bool                        bAirbornBoost;

function Touch( Actor Other )
{
 if ((other.isa('onsvehicle')==true) && ((onsvehicle(other).bvehicleonground==true) && (bAirbornBoost==true)))  
     VecBoost(onsvehicle(other)); 
super.touch(other);                  // adds any associated code from the parent function
}                                          

simulated function  VecBoost( onsvehicle TheVec)
{
 local actor  RotRelation;

 RotRelation = TheVec;             // will kick the vec in the diection its facing

 if ( bDirectional)               // if bdirectional is true: kick vec in direction this actor
     RotRelation = self;          // ia facing

 TheVec.KAddImpulse( AppliedBoostForce >> TheVec.Rotation, vect(0,0,0) >> TheVec.Rotation ) ;

 if ( VocBoost!= None )
     {
      PlaySound ( VocBoost) ;      //sound fx
      TheVec.MakeNoise(1.0);
     }
}

defaultproperties
{
     AppliedBoostForce=(X=9000000.000000)
     VocBoost=Sound'AnnouncerEvil.Booster'
     Texture=Texture'XEffectMat.Shock.Shock_ring_a'
     CollisionRadius=150.000000
     CollisionHeight=150.000000
}

Updated

Added the condition ;

((onsvehicle(other).bvehicleonground==true) && (bAirbornBoost==true))

to the Bump() function. This make things a bit easyer when using the vecbooster to boost the vehicle over hazzards like large drops so .Now you can just put a vecbooster either side and not have to worry about being boosted again untill you have landed.

Related Topics

VitalOverdose/VehicleTeleporter

VitalOverdose/RandomRelocator

 

 

Discussion

Category Custom Class

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Recent Changes

Offline Wiki

Unreal Engine

Console Commands

Terminology

FAQs

Help Desk

Mapping Topics

Mapping Lessons

UnrealEd Interface

UnrealScript Topics

UnrealScript Lessons

Making Mods

Class Tree

Modeling Topics

Chongqing Page

Log In