Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 |
//============================================================================= // ExplosionChain. //============================================================================= class ExplosionChain expands Effects; #exec Texture Import File=models\exp001.pcx Name=s_Exp001 Mips=Off Mask=On Flags=2 var() float MomentumTransfer; var() float Damage; var() float Size; var() float Delaytime; var bool bExploding; function PreBeginPlay() { Texture=None; Super.PreBeginPlay(); } singular function TakeDamage( int NDamage, Pawn instigatedBy, Vector hitlocation, Vector momentum, name damageType) { if (bOnlyTriggerable && DamageType!='Detonated') Return; Instigator = InstigatedBy; GoToState('Exploding'); } function Trigger( actor Other, pawn EventInstigator ) { TakeDamage(10, EventInstigator, Location, Vector(Rotation), 'Detonated'); } ////////////////////////////////////////////////////////////// state Exploding { ignores TakeDamage; function Timer() { local SpriteBallExplosion f; bExploding = true; HurtRadius(damage, Damage+100, 'Detonated', MomentumTransfer, Location); f = spawn(class'SpriteBallExplosion',,,Location + vect(0,0,1)*16,rot(16384,0,0)); f.DrawScale = (Damage/100+0.4+FRand()*0.5)*Size; Destroy(); } function BeginState() { bExploding = True; SetTimer(DelayTime+FRand()*DelayTime*2, False); } } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |