Ejection Trigger
OverView
This custom Trigger actor is designed quite simply to detect any vehicles that come within a cetain distance and if a driver is present ..eject the driver.//
///////////////////////////////////////////////////////////////////// // by vitaloverdose Feb 2006. // Http://www.vitaloverdose.com /////////////////////////////////////////////////////////////////////// class Ejection_Trigger extends Trigger Placeable; Var () Int VecDamage; // Mapper can set in unrealEd. Var () Int DriverDamage; // Mapper can set in unrealEd. Var () Float Ejectmultiplyer; // Mapper can set in unrealEd. Var () Sound EjectSoundFx; // Mapper can set in unrealEd. Var () Sound RejectSoundFx; // Mapper can set in unrealEd. Var () Sound ValidContactSoundFx; // Mapper can set in unrealEd. Var () Class< Damagetype > DriverDamageType; // Mapper can set in unrealEd. Var () Class< DamageType > VecDamageType; // Mapper can set in unrealEd. simulated Function Touch( Actor Other) { if ((Other.IsA('onsVehicle')) && (onsVehicle(Other).Driver != None) ) Eject( OnsVehicle(Other)); else If ( RejectSoundFx!=None) Playsound(RejectSoundFx); Super.touch(other); } simulated Function Eject( OnsVehicle Vec ) { local pawn EjectedDriver; Vec.EjectMomentum *= Ejectmultiplyer; EjectedDriver = Vec.Driver; Vec.EjectDriver(); If ( ValidContactSoundFx!=None) Playsound(ValidContactSoundFx); if ( DriverDamage > 1) EjectedDriver.TakeDamage(DriverDamage , Instigator , EjectedDriver.Location , vect(0,0,10000),DriverDamagetype ) ; if ( VecDamage > 1 ) Vec.TakeDamage(VecDamage , Instigator , vec.Location , vect(0,0,10000),VecDamagetype ) ; }
Related
VitalOverdose/VehicleTeleporter
discusion
Tarquin: Vital, please stop adding class pages if you're not going to bother formatting them properly.
Tarquin: I see two pages for this one class. Please decide which is the definitive one and delete the others.