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 |
//============================================================================= // MortarSpawner. //============================================================================= class MortarSpawner extends Effects; var() int ShellDamage; var() int ShellMomentumTransfer; var() int ShellBlastRadius; var() int RateOfFire; var() float ShellSpeed; var() int Deviation; var() bool bDeviate; var() sound FireSound; function BeginPlay() { SetTimer(RateOfFire, True); } function Timer() { LaunchShell(); PlaySound(FireSound, SLOT_None, 4.0); } function LaunchShell() { local rotator NewRot; local MortarShell shell; if (bDeviate) { NewRot.Pitch = Rotation.Pitch + (Deviation/2) - (Deviation * FRand()); NewRot.Roll = Rotation.Roll + (Deviation/2) - (Deviation * FRand()); NewRot.Yaw = Rotation.Yaw + (Deviation/2) - (Deviation * FRand()); } else NewRot = Rotation; shell = Spawn(class'MortarShell',,, Location+Vector(Rotation)*20, NewRot); shell.speed = ShellSpeed; shell.damage = ShellDamage; shell.momentumtransfer = ShellMomentumTransfer; shell.blastradius = ShellBlastRadius; } defaultproperties { ShellDamage=70 ShellMomentumTransfer=150000 ShellBlastRadius=400 RateOfFire=5 ShellSpeed=1000.000000 Deviation=4096 bDeviate=True FireSound=Sound'UnrealShare.flak.Explode1' bHidden=True bNetTemporary=False bDirectional=True DrawType=DT_Sprite } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |