I search for solutions in this order: Past Code, Unreal Source, Wiki, BUF, groups.yahoo, google, screaming at monitor. – RegularX
Difference between revisions of "Legacy:VitalOverdose/SFXBoosting"
From Unreal Wiki, The Unreal Engine Documentation Site
m |
m (→More custom SFX emitter scripts) |
||
Line 158: | Line 158: | ||
===More custom SFX emitter scripts=== | ===More custom SFX emitter scripts=== | ||
− | *[[Legacy:VitalOverdose/ | + | *[[Legacy:VitalOverdose/SFXVehicleTeleporting | SFXVehicleTeleporting]] |
− | *[[Legacy:VitalOverdose/ | + | *[[Legacy:VitalOverdose/SFXPainful | SFXPainful]] |
*[[Legacy:VitalOverdose/SFXTriggering | SFXTriggering]] | *[[Legacy:VitalOverdose/SFXTriggering | SFXTriggering]] | ||
+ | *[[Legacy:VitalOverdose/SFXEjecting | SFXEjecting]] | ||
*[[Legacy:VitalOverdose/SFXMonsterSpawning | SFXMonsterSpawning]] | *[[Legacy:VitalOverdose/SFXMonsterSpawning | SFXMonsterSpawning]] | ||
*[[Legacy:VitalOverdose/SFXHealing | SFXHealing]] | *[[Legacy:VitalOverdose/SFXHealing | SFXHealing]] | ||
*[[Legacy:VitalOverdose/SFXSelfScaling | SFXSelfScaling]] | *[[Legacy:VitalOverdose/SFXSelfScaling | SFXSelfScaling]] | ||
− | *[[Legacy: | + | *[[Legacy:VitalOverdose/SFXUltraLight | SFXUltraLight]] |
− | *[[Legacy:VitalOverdose/InventoryFlare | InventoryFlare]] | + | *[[Legacy:VitalOverdose/InventoryFlare |InventoryFlare]] |
+ | *[[Legacy:VitalOverdose/ExampleFlares | ExampleFlares]] | ||
==Discussion== | ==Discussion== | ||
[[Category:Legacy Custom Class (UT2004)|{{PAGENAME}}]] | [[Category:Legacy Custom Class (UT2004)|{{PAGENAME}}]] |
Latest revision as of 07:04, 14 September 2011
class SFx_Boosting Extends Emitter placeable; struct VecRec { var OnsVehicle VevRef; Var float RecTime; };Var Array< VecRec > Tracking; var bool bTracking; var int TotalParticles; var () float CaptureTime; Var () int ActiveEmitterNumb; Var () int TimerFrequency; Var () float ScanSize; Var (Boost) bool bCuasesBoost_Player; Var (Boost) bool bLocks_Player; Var (Boost) bool bCuasesBoost_Bot; Var (Boost) bool bbLocks_Bot; var (Boost) sound VocBoost; var (boost) vector AppliedBoostForce; Simulated Function PostBeginPlay() { if ( Emitters[ActiveEmitterNumb].MaxParticles > 10) Destroyed(); if (AppliedBoostForce == Vect(0,0,0)) AppliedBoostForce.X=9000000.000000; Super.PostBeginPlay(); } Function tick(Float deltaTime) { local ONSvehicle FoundONSvec; Local Int Counter; for ( Counter=0 ; Counter < Emitters[0].Particles.Length ; Counter++ ) { foreach visiblecollidingActors(Class'ONSvehicle', FoundONSvec , ScanSize , Emitters[ActiveEmitterNumb].Particles[Counter].Location ) { VecBoost(FoundONSvec); } } } Simulated Function VecBoost( OnsVehicle TheVec ) { Local Vector PointOfBoostForce; //PointOfBoostForce defaults to(0,0,0) center of the vec Local Actor RotRelation; //point of boost force EnterVecRec( TheVec ); if ( bDirectional) RotRelation = self ; else RotRelation = TheVec; TheVec.KAddImpulse( AppliedBoostForce >> RotRelation.Rotation, PointOfBoostForce >> RotRelation.Rotation ) ; } Function enterVecRec( ONSVehicle NewVec ) { Tracking.insert(0,1); Tracking[0].VevRef = NewVec; Tracking[0].RecTime = CaptureTime; if ( Tracking.Length != 1 ) Return; // check to see if the Array was previously empty if ( NewVec.Driver.IsA('xBot')) NewVec.bDriverCannotLeaveVehicle= True; If (bTracking == false ) { bTracking = True; SetTimer(TimerFrequency,True); // set Timer to repeatedly be called every 'Timerfrequncy' } } // Length of Time untill shut off. Function Timer() { Local Int Counter; for ( Counter=0; Counter<Tracking.Length; Counter++ ) { Tracking[Counter].recTime -= TimerFrequency; if (Tracking[Counter].recTime<TimerFrequency) { Tracking[Counter].VevRef.bDriverCannotLeaveVehicle = False ; Tracking.remove( Counter , 1); if (Tracking.Length==0) { bTracking = False; disable('Timer'); } } } } Simulated Function postboost(Vehicle TheBoostedvec) { if ( VocBoost!= None ) PlaySound (VocBoost) ; //Sound Fx } defaultproperties { bNoDelete=False RemoteRole=ROLE_SimulatedProxy }
Related Topcs[edit]
- Vehicles
- Emitter
- Particle System
- ParticleEmitter
- ParticleEmitter Cookbook
- udn2:EmittersReference
- udn2:EmittersExamples
More custom SFX emitter scripts[edit]
- SFXVehicleTeleporting
- SFXPainful
- SFXTriggering
- SFXEjecting
- SFXMonsterSpawning
- SFXHealing
- SFXSelfScaling
- SFXUltraLight
- InventoryFlare
- ExampleFlares