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 00124 00125 00126 00127 00128 00129 00130 00131 00132 00133 00134 00135 00136 00137 00138 00139 00140 00141 00142 00143 00144 00145 00146 00147 00148 00149 00150 00151 00152 00153 00154 00155 00156 00157 00158 00159 00160 00161 00162 00163 00164 00165 00166 00167 00168 00169 |
//============================================================================= // PeaceMaker. //============================================================================= class PeaceMaker extends Weapon; #exec MESH IMPORT MESH=peacehand ANIVFILE=Models\phand_a.3D DATAFILE=Models\phand_d.3D X=0 Y=0 Z=0 unmirror=1 #exec MESH ORIGIN MESH=peacehand X=0 Y=0 Z=0 YAW=-64 ROLL=0 PITCH=0 #exec MESH SEQUENCE MESH=peacehand SEQ=All STARTFRAME=0 NUMFRAMES=54 #exec MESH SEQUENCE MESH=peacehand SEQ=Select STARTFRAME=0 NUMFRAMES=20 #exec MESH SEQUENCE MESH=peacehand SEQ=Still STARTFRAME=20 NUMFRAMES=1 #exec MESH SEQUENCE MESH=peacehand SEQ=Down STARTFRAME=21 NUMFRAMES=12 #exec MESH SEQUENCE MESH=peacehand SEQ=Throw STARTFRAME=33 NUMFRAMES=10 #exec MESH SEQUENCE MESH=peacehand SEQ=CountZero STARTFRAME=43 NUMFRAMES=1 #exec MESH SEQUENCE MESH=peacehand SEQ=CountOne STARTFRAME=44 NUMFRAMES=1 #exec MESH SEQUENCE MESH=peacehand SEQ=CountTwo STARTFRAME=45 NUMFRAMES=1 #exec MESH SEQUENCE MESH=peacehand SEQ=CountThree STARTFRAME=46 NUMFRAMES=1 #exec MESH SEQUENCE MESH=peacehand SEQ=CountFour STARTFRAME=47 NUMFRAMES=1 #exec MESH SEQUENCE MESH=peacehand SEQ=CountFive STARTFRAME=48 NUMFRAMES=1 #exec MESH SEQUENCE MESH=peacehand SEQ=CountSix STARTFRAME=49 NUMFRAMES=1 #exec MESH SEQUENCE MESH=peacehand SEQ=CountSeven STARTFRAME=50 NUMFRAMES=1 #exec MESH SEQUENCE MESH=peacehand SEQ=CountEight STARTFRAME=51 NUMFRAMES=1 #exec MESH SEQUENCE MESH=peacehand SEQ=CountNine STARTFRAME=52 NUMFRAMES=1 #exec MESH SEQUENCE MESH=peacehand SEQ=Count STARTFRAME=43 NUMFRAMES=11 #exec TEXTURE IMPORT NAME=Jpeacehand1 FILE=Models\peaceh.PCX GROUP=Skins #exec MESHMAP SCALE MESHMAP=peacehand X=0.005 Y=0.005 Z=0.01 #exec MESHMAP SETTEXTURE MESHMAP=peacehand NUM=1 TEXTURE=Jpeacehand1 #exec MESHMAP SETTEXTURE MESHMAP=peacehand NUM=0 TEXTURE=Jpeacehand1 #exec MESH IMPORT MESH=peacepick ANIVFILE=Models\peacpi_a.3D DATAFILE=Models\phand_d.3D X=0 Y=0 Z=0 #exec MESH ORIGIN MESH=peacepick X=0 Y=0 Z=10 YAW=-64 ROLL=0 PITCH=0 #exec MESH SEQUENCE MESH=peacepick SEQ=All STARTFRAME=0 NUMFRAMES=1 #exec MESH SEQUENCE MESH=peacepick SEQ=Still STARTFRAME=0 NUMFRAMES=1 #exec TEXTURE IMPORT NAME=Jpeacehand1 FILE=Models\peaceh.PCX GROUP=Skins #exec MESHMAP SCALE MESHMAP=peacepick X=0.08 Y=0.08 Z=0.16 #exec MESHMAP SETTEXTURE MESHMAP=peacepick NUM=1 TEXTURE=Jpeacehand1 #exec MESHMAP SETTEXTURE MESHMAP=peacepick NUM=0 TEXTURE=Jpeacehand1 var float ChargeTime; var() name CountFrames[10]; var byte Counter; var bool bIsRocketMode; function Fire( float Value ) { bPointing=True; GotoState('NormalFire'); } function AltFire( float Value ) { bPointing=True; GoToState('AltFiring'); } function ThrowBarrel(bool bRocketMode) { local vector X,Y,Z; local PeaceBarrel NewBarrel; local Pawn OwnerPawn; local rotator Aim; OwnerPawn = Pawn(Owner); //Owner.PlaySound(Misc1Sound, SLOT_Misc, OwnerPawn.SoundDampening); // Tossing barrel GetAxes(OwnerPawn.Rotation,X,Y,Z); Aim = OwnerPawn.AdjustAim(class'PeaceBarrel'.Default.Speed,(Owner.Location + 30*X - 9*Y - Z*20),25,true,false); GetAxes(Aim,X,Y,Z); NewBarrel = Spawn(class'PeaceBarrel',, '', Owner.Location + 30 * X - 9 * Y - Z * 20, Aim); NewBarrel.bFireType = bRocketMode; NewBarrel.CountDown = ChargeTime; OwnerPawn.DeleteInventory(self); OwnerPawn.SwitchToBestWeapon(); Destroy(); } /////////////////////////////////////////////////////// state NormalFire { function Tick( float DeltaTime ) { ChargeTime += DeltaTime; if( (pawn(Owner).bFire==0)) { bIsRocketMode = true; GoToState('TossPeaceMaker'); } } Begin: ChargeTime = 0.0; TweenAnim(CountFrames[0],0.0); Sleep(0.75); for( Counter=1; Counter<=9; Counter++ ) { TweenAnim(CountFrames[Counter],0.0); Sleep(1); } bIsRocketMode = true; GoToState('TossPeaceMaker'); } //////////////////////////////////////////////////////// state AltFiring { function Tick( float DeltaTime ) { ChargeTime += DeltaTime; if( (pawn(Owner).bAltFire==0)) { bIsRocketMode = false; GoToState('TossPeaceMaker'); } } Begin: ChargeTime = 0.0; TweenAnim(CountFrames[0],0.0); Sleep(0.75); for( Counter=1; Counter<=9; Counter++ ) { TweenAnim(CountFrames[Counter],0.0); Sleep(1); } bIsRocketMode = false; GoToState('TossPeaceMaker'); } /////////////////////////////////////////////////////////// state TossPeaceMaker { Ignores Fire,AltFire,PutDown; Begin: PlayAnim('Throw',0.5); FinishAnim(); ThrowBarrel(bIsRocketMode); } /////////////////////////////////////////////////////////// function PlayIdleAnim() { PlayAnim('Still'); } defaultproperties { CountFrames(0)="CountZero" CountFrames(1)="CountOne" CountFrames(2)="CountTwo" CountFrames(3)="CountThree" CountFrames(4)="CountFour" CountFrames(5)="CountFive" CountFrames(6)="CountSix" CountFrames(7)="CountSeven" CountFrames(8)="CountEight" CountFrames(9)="CountNine" AmmoName=Class'UnrealI.PeaceAmmo' PickupAmmoCount=1 AutoSwitchPriority=5 InventoryGroup=5 PickupMessage="You got the Peacemaker" PlayerViewOffset=(X=3.000000,Y=-1.500000,Z=-1.500000) PlayerViewMesh=LodMesh'UnrealI.peacehand' PickupViewMesh=LodMesh'UnrealI.peacepick' ThirdPersonMesh=LodMesh'UnrealI.peacepick' PickupSound=Sound'UnrealShare.Pickups.WeaponPickup' Mesh=LodMesh'UnrealI.peacepick' bNoSmooth=False } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |