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 00058 00059 00060 00061 00062 00063 00064 00065 |
//============================================================================= // GasbagBelch. //============================================================================= class GasbagBelch expands Projectile; #exec TEXTURE IMPORT NAME=gbProj0 FILE=MODELS\gb_a00.pcx GROUP=Effects #exec TEXTURE IMPORT NAME=gbProj1 FILE=MODELS\gb_a01.pcx GROUP=Effects #exec TEXTURE IMPORT NAME=gbProj2 FILE=MODELS\gb_a02.pcx GROUP=Effects #exec TEXTURE IMPORT NAME=gbProj3 FILE=MODELS\gb_a03.pcx GROUP=Effects #exec TEXTURE IMPORT NAME=gbProj4 FILE=MODELS\gb_a04.pcx GROUP=Effects #exec TEXTURE IMPORT NAME=gbProj5 FILE=MODELS\gb_a05.pcx GROUP=Effects #exec AUDIO IMPORT FILE="Sounds\flak\expl2.wav" NAME="expl2" GROUP="flak" var() texture SpriteAnim[6]; var int i; function Timer() { Texture = SpriteAnim[i]; i++; if (i>=6) i=0; } function PostBeginPlay() { if ( ScriptedPawn(Instigator) != None ) Speed = ScriptedPawn(Instigator).ProjectileSpeed; PlaySound(SpawnSound); Velocity = Vector(Rotation) * speed; MakeNoise ( 1.0 ); Texture = SpriteAnim[0]; i=1; SetTimer(0.15,True); Super.PostBeginPlay(); } auto state Flying { function ProcessTouch (Actor Other, Vector HitLocation) { if (Other != instigator) { Other.TakeDamage(Damage, instigator,HitLocation, 15000.0 * Normal(velocity), 'burned'); Explode(HitLocation, Vect(0,0,0)); } } function Explode(vector HitLocation, vector HitNormal) { if (FRand() < 0.5) MakeNoise(1.0); //FIXME - set appropriate loudness Spawn(class'SpriteBallExplosion',,,HitLocation+HitNormal*9); Destroy(); } Begin: Sleep(3); Explode(Location, Vect(0,0,0)); } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |