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 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 00113 00114 00115 00116 00117 00118 00119 00120 00121 00122 00123 |
//============================================================================= // HorseFly. // Do not add directly. Rather, add HorseFlySwarms to the world. //============================================================================= class HorseFly extends FlockPawn; #exec MESH IMPORT MESH=Firefly ANIVFILE=MODELS\firefl_a.3D DATAFILE=MODELS\firefl_d.3D LODSTYLE=2 #exec MESH LODPARAMS MESH=FireFly STRENGTH=0.6 #exec MESH ORIGIN MESH=Firefly X=0 Y=00 Z=0 YAW=64 #exec MESH SEQUENCE MESH=Firefly SEQ=All STARTFRAME=0 NUMFRAMES=5 #exec MESH SEQUENCE MESH=Firefly SEQ=Still STARTFRAME=0 NUMFRAMES=1 #exec MESH SEQUENCE MESH=Firefly SEQ=Flying STARTFRAME=0 NUMFRAMES=4 #exec MESH SEQUENCE MESH=Firefly SEQ=FastFly STARTFRAME=4 NUMFRAMES=2 #exec TEXTURE IMPORT NAME=JFirefly1 FILE=MODELS\firefly.PCX GROUP=Skins #exec MESHMAP SCALE MESHMAP=Firefly X=0.006 Y=0.006 Z=0.012 #exec MESHMAP SETTEXTURE MESHMAP=firefly NUM=1 TEXTURE=Jfirefly1 #exec AUDIO IMPORT FILE="Sounds\Flies\buzz3.WAV" NAME="flybuzz" GROUP="Flies" //----------------------------------------------------------------------------- // Horsefly variables. //============== // Encroachment function bool EncroachingOn( actor Other ) { if ( (Other.Brush != None) || (Brush(Other) != None) ) return true; return false; } function EncroachedBy( actor Other ) { } function PlayTakeHit(float tweentime, vector HitLoc, int damage) { } function Died(pawn Killer, name damageType, vector HitLocation) { GotoState('Dying'); } auto state meander { ignores seeplayer, enemynotvisible, footzonechange; singular function ZoneChange( ZoneInfo NewZone ) { if (NewZone.bWaterZone || NewZone.bPainZone) { SetLocation(OldLocation); Velocity = vect(0,0,0); Acceleration = vect(0,0,0); MoveTimer = -1.0; } } begin: LoopAnim('Flying'); SetPhysics(PHYS_Flying); wander: if ( Owner == None ) Destroy(); if (!LineOfSightTo(Owner)) SetLocation(Owner.Location); MoveTo(Owner.Location + HorseflySwarm(Owner).swarmradius * (VRand() + vect(0,0,0.3))); if ( Owner == None ) Destroy(); if ( HorseflySwarm(Owner).bOnlyIfEnemy && (Pawn(Owner).Enemy == None) && (FRand() < 0.1) ) { HorseflySwarm(Owner).swarmsize++; Destroy(); } else Goto('Wander'); } State Dying { ignores seeplayer, enemynotvisible, footzonechange; function Landed(vector HitNormal) { SetPhysics(PHYS_None); } Begin: if ( Owner != None ) { HorseflySwarm(Owner).totalflies--; if ( HorseflySwarm(Owner).totalflies <= 0 ) Owner.Destroy(); } SetPhysics(PHYS_Falling); RemoteRole = ROLE_DumbProxy; Sleep(15); Destroy(); } defaultproperties { AirSpeed=200.000000 Land=None DrawType=DT_Mesh Mesh=LodMesh'UnrealShare.Firefly' SoundRadius=7 SoundVolume=64 AmbientSound=Sound'UnrealShare.flies.flybuzz' CollisionRadius=0.000000 CollisionHeight=0.000000 bCollideActors=False bBlockActors=False bBlockPlayers=False bProjTarget=False } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |