Core.Object | +--Engine.Actor | +--Engine.Effects | +--Engine.Fragment | +--XIII.FragmentExplo
Trail
MyTrail
class
MyTrailClass
simulated
HitWall(vector HitNormal, Actor HitWall)
//_____________________________________________________________________________
PostBeginPlay()
//_____________________________________________________________________________ // Set up speed
00001 //----------------------------------------------------------- 00002 // 00003 //----------------------------------------------------------- 00004 class FragmentExplo extends Fragment; 00005 00006 var class<Trail> MyTrailClass; 00007 var Trail MyTrail; 00008 00009 //_____________________________________________________________________________ 00010 // Set up speed 00011 simulated function PostBeginPlay() 00012 { 00013 Super.PostBeginPlay(); 00014 00015 MyTrail = Spawn(MyTrailClass,self,,Location); 00016 MyTrail.RotationSpeed = (fRand()*2.0-1.0)*MyTrail.default.RotationSpeed; 00017 MyTrail.RibbonColor = MyTrail.default.RibbonColor * fRand(); 00018 MyTrail.ActorOffset = vRand() * 5.0; 00019 MyTrail.Init(); 00020 } 00021 00022 //_____________________________________________________________________________ 00023 simulated function HitWall (vector HitNormal, actor HitWall) 00024 { 00025 MyTrail.RibbonColor = MyTrail.RibbonColor * 0.5; 00026 MyTrail.RotationSpeed *= 0.5; 00027 MyTrail.ActorOffset *= 0.5; 00028 MyTrail.FadePeriod *= 0.5; 00029 Super.HitWall(HitNormal, HitWall); 00030 } 00031 00032 //_____________________________________________________________________________ 00033 simulated event Destroyed() 00034 { 00035 Super.Destroyed(); 00036 if ( (MyTrail != none) && !MyTrail.bDeleteMe ) 00037 MyTrail.Destroy(); 00038 } 00039 00040 00041 00042 defaultproperties 00043 { 00044 MyTrailClass=Class'XIII.FragmentTrail' 00045 bCollideActors=True 00046 DrawType=DT_StaticMesh 00047 StaticMesh=StaticMesh'StaticExplosifs.grenadfragment' 00048 }