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 00170 00171 00172 00173 00174 00175 00176 00177 00178 00179 00180 00181 00182 00183 00184 00185 00186 00187 00188 00189 00190 00191 00192 00193 00194 00195 00196 00197 00198 00199 00200 00201 00202 00203 00204 00205 00206 00207 00208 00209 00210 00211 00212 00213 00214 00215 00216 00217 00218 00219 00220 00221 00222 00223 00224 00225 00226 00227 00228 00229 00230 00231 00232 00233 00234 00235 00236 00237 00238 00239 00240 00241 00242 00243 00244 00245 00246 00247 00248 00249 00250 00251 00252 00253 00254 00255 00256 00257 00258 00259 00260 00261 00262 00263 00264 00265 00266 00267 00268 00269 00270 00271 00272 00273 00274 00275 00276 00277 00278 00279 00280 00281 00282 00283 00284 00285 00286 00287 00288 00289 00290 00291 00292 00293 00294 00295 00296 00297 00298 00299 00300 00301 00302 00303 00304 00305 00306 00307 00308 00309 00310 00311 00312 00313 00314 00315 00316 00317 00318 00319 00320 00321 00322 00323 00324 00325 00326 00327 00328 00329 00330 00331 00332 00333 00334 00335 00336 00337 00338 00339 00340 00341 00342 00343 00344 00345 00346 00347 00348 00349 00350 00351 00352 00353 00354 00355 00356 00357 00358 00359 00360 00361 00362 00363 00364 00365 00366 00367 00368 00369 00370 00371 00372 00373 00374 00375 00376 00377 00378 00379 00380 00381 00382 00383 00384 00385 00386 00387 00388 00389 00390 00391 00392 00393 00394 00395 00396 00397 00398 00399 00400 00401 00402 00403 00404 00405 00406 00407 00408 00409 00410 00411 00412 00413 00414 00415 00416 00417 00418 00419 00420 00421 00422 00423 00424 00425 00426 00427 00428 00429 00430 00431 00432 00433 00434 00435 00436 00437 00438 00439 00440 00441 00442 00443 00444 00445 00446 00447 00448 00449 00450 00451 00452 00453 00454 00455 00456 00457 00458 00459 00460 00461 00462 00463 00464 00465 00466 00467 00468 00469 00470 00471 00472 00473 00474 00475 00476 00477 00478 00479 00480 00481 00482 00483 00484 00485 00486 |
//============================================================================= // NaliPlayer. //============================================================================= class NaliPlayer extends UnrealIPlayer; #exec MESH IMPORT MESH=Nali2 ANIVFILE=MODELS\naliX_a.3D DATAFILE=..\unrealshare\MODELS\nali_d.3D X=0 Y=0 Z=0 ZEROTEX=1 #exec MESH ORIGIN MESH=Nali2 X=00 Y=-130 Z=30 YAW=64 ROLL=-64 #exec MESH SEQUENCE MESH=nali2 SEQ=All STARTFRAME=0 NUMFRAMES=447 #exec MESH SEQUENCE MESH=nali2 SEQ=Backup STARTFRAME=0 NUMFRAMES=10 RATE=15 #exec MESH SEQUENCE MESH=nali2 SEQ=Bowing STARTFRAME=10 NUMFRAMES=20 RATE=15 Group=Ducking #exec MESH SEQUENCE MESH=nali2 SEQ=Breath STARTFRAME=30 NUMFRAMES=8 RATE=6 Group=Waiting #exec MESH SEQUENCE MESH=nali2 SEQ=Cough STARTFRAME=38 NUMFRAMES=25 RATE=15 Group=Waiting #exec MESH SEQUENCE MESH=nali2 SEQ=Landed STARTFRAME=68 NUMFRAMES=1 Group=Landing #exec MESH SEQUENCE MESH=nali2 SEQ=Cringe STARTFRAME=63 NUMFRAMES=15 RATE=15 Group=Ducking #exec MESH SEQUENCE MESH=nali2 SEQ=Dead STARTFRAME=78 NUMFRAMES=38 RATE=15 #exec MESH SEQUENCE MESH=nali2 SEQ=DeathEnd STARTFRAME=115 NUMFRAMES=1 #exec MESH SEQUENCE MESH=nali2 SEQ=Dead2 STARTFRAME=116 NUMFRAMES=16 RATE=15 #exec MESH SEQUENCE MESH=nali2 SEQ=DeathEnd2 STARTFRAME=131 NUMFRAMES=1 #exec MESH SEQUENCE MESH=nali2 SEQ=Dead3 STARTFRAME=132 NUMFRAMES=13 RATE=15 #exec MESH SEQUENCE MESH=nali2 SEQ=Dead4 STARTFRAME=145 NUMFRAMES=21 RATE=15 #exec MESH SEQUENCE MESH=nali2 SEQ=Wave STARTFRAME=166 NUMFRAMES=23 RATE=15 Group=Gesture #exec MESH SEQUENCE MESH=nali2 SEQ=GetDown STARTFRAME=189 NUMFRAMES=5 RATE=15 #exec MESH SEQUENCE MESH=nali2 SEQ=GetUp STARTFRAME=194 NUMFRAMES=8 RATE=15 #exec MESH SEQUENCE MESH=nali2 SEQ=levitate STARTFRAME=202 NUMFRAMES=6 RATE=6 #exec MESH SEQUENCE MESH=nali2 SEQ=Victory1 STARTFRAME=208 NUMFRAMES=8 RATE=6 Group=Gesture #exec MESH SEQUENCE MESH=nali2 SEQ=spell STARTFRAME=216 NUMFRAMES=28 RATE=15 #exec MESH SEQUENCE MESH=nali2 SEQ=Sweat STARTFRAME=244 NUMFRAMES=18 RATE=15 Group=Waiting #exec MESH SEQUENCE MESH=nali2 SEQ=walk STARTFRAME=262 NUMFRAMES=20 RATE=15 #exec MESH SEQUENCE MESH=nali2 SEQ=turn STARTFRAME=262 NUMFRAMES=5 RATE=15 #exec MESH SEQUENCE MESH=nali2 SEQ=GutHit STARTFRAME=282 NUMFRAMES=1 Group=TakeHit #exec MESH SEQUENCE MESH=nali2 SEQ=AimDown STARTFRAME=283 NUMFRAMES=1 Group=Waiting #exec MESH SEQUENCE MESH=nali2 SEQ=AimUp STARTFRAME=284 NUMFRAMES=1 Group=Waiting #exec MESH SEQUENCE MESH=nali2 SEQ=Bow2 STARTFRAME=285 NUMFRAMES=28 RATE=15 #exec MESH SEQUENCE MESH=nali2 SEQ=HeadHit STARTFRAME=313 NUMFRAMES=1 Group=TakeHit #exec MESH SEQUENCE MESH=nali2 SEQ=LeftHit STARTFRAME=314 NUMFRAMES=1 Group=TakeHit #exec MESH SEQUENCE MESH=nali2 SEQ=RightHit STARTFRAME=315 NUMFRAMES=1 Group=TakeHit #exec MESH SEQUENCE MESH=nali2 SEQ=Run STARTFRAME=316 NUMFRAMES=10 RATE=15 #exec MESH SEQUENCE MESH=nali2 SEQ=RunFire STARTFRAME=326 NUMFRAMES=10 RATE=15 #exec MESH SEQUENCE MESH=nali2 SEQ=StilFire STARTFRAME=336 NUMFRAMES=1 Group=Waiting #exec MESH SEQUENCE MESH=nali2 SEQ=WalkFire STARTFRAME=337 NUMFRAMES=20 RATE=15 #exec MESH SEQUENCE MESH=nali2 SEQ=WalkTool STARTFRAME=357 NUMFRAMES=20 RATE=15 #exec MESH SEQUENCE MESH=nali2 SEQ=Drowning STARTFRAME=377 NUMFRAMES=20 RATE=15 #exec MESH SEQUENCE MESH=nali2 SEQ=Duckwalk STARTFRAME=397 NUMFRAMES=20 RATE=15 #exec MESH SEQUENCE MESH=nali2 SEQ=Swim STARTFRAME=417 NUMFRAMES=15 RATE=15 #exec MESH SEQUENCE MESH=nali2 SEQ=Tread STARTFRAME=432 NUMFRAMES=15 RATE=15 #exec MESH SEQUENCE MESH=nali2 SEQ=fighter STARTFRAME=0 NUMFRAMES=1 #exec TEXTURE IMPORT NAME=JNali1 FILE=..\unrealshare\MODELS\nali.PCX GROUP=Skins #exec MESHMAP SCALE MESHMAP=nali2 X=0.069 Y=0.069 Z=0.138 #exec MESHMAP SETTEXTURE MESHMAP=nali2 NUM=0 TEXTURE=Jnali1 #exec MESH NOTIFY MESH=Nali2 SEQ=Dead TIME=0.46 FUNCTION=LandThump #exec MESH NOTIFY MESH=Nali2 SEQ=Dead2 TIME=0.64 FUNCTION=LandThump #exec MESH NOTIFY MESH=Nali2 SEQ=Dead3 TIME=0.84 FUNCTION=LandThump #exec MESH NOTIFY MESH=Nali2 SEQ=Dead4 TIME=0.51 FUNCTION=LandThump #exec MESH NOTIFY MESH=Nali2 SEQ=Backup TIME=0.25 FUNCTION=PlayFootStep #exec MESH NOTIFY MESH=Nali2 SEQ=Backup TIME=0.75 FUNCTION=PlayFootStep #exec MESH NOTIFY MESH=Nali2 SEQ=Walk TIME=0.25 FUNCTION=PlayFootStep #exec MESH NOTIFY MESH=Nali2 SEQ=Walk TIME=0.75 FUNCTION=PlayFootStep #exec MESH NOTIFY MESH=Nali2 SEQ=WalkFire TIME=0.25 FUNCTION=PlayFootStep #exec MESH NOTIFY MESH=Nali2 SEQ=WalkFire TIME=0.75 FUNCTION=PlayFootStep #exec MESH NOTIFY MESH=Nali2 SEQ=WalkTool TIME=0.25 FUNCTION=PlayFootStep #exec MESH NOTIFY MESH=Nali2 SEQ=WalkTool TIME=0.75 FUNCTION=PlayFootStep #exec MESH NOTIFY MESH=Nali2 SEQ=Run TIME=0.25 FUNCTION=PlayFootStep #exec MESH NOTIFY MESH=Nali2 SEQ=Run TIME=0.75 FUNCTION=PlayFootStep #exec MESH NOTIFY MESH=Nali2 SEQ=RunFire TIME=0.25 FUNCTION=PlayFootStep #exec MESH NOTIFY MESH=Nali2 SEQ=RunFire TIME=0.75 FUNCTION=PlayFootStep #exec AUDIO IMPORT FILE="..\unrealshare\Sounds\Nali\injur1a.WAV" NAME="injur1n" GROUP="Nali" #exec AUDIO IMPORT FILE="..\unrealshare\Sounds\Nali\injur2a.WAV" NAME="injur2n" GROUP="Nali" #exec AUDIO IMPORT FILE="..\unrealshare\Sounds\Nali\contct1a.WAV" NAME="contct1n" GROUP="Nali" #exec AUDIO IMPORT FILE="..\unrealshare\Sounds\Nali\contct3a.WAV" NAME="contct3n" GROUP="Nali" #exec AUDIO IMPORT FILE="..\unrealshare\Sounds\Nali\fear1a.WAV" NAME="fear1n" GROUP="Nali" #exec AUDIO IMPORT FILE="..\unrealshare\Sounds\Nali\breath2na.WAV" NAME="breath1n" GROUP="Nali" #exec AUDIO IMPORT FILE="..\unrealshare\Sounds\Nali\death1na.WAV" NAME="death1n" GROUP="Nali" #exec AUDIO IMPORT FILE="..\unrealshare\Sounds\Nali\death2a.WAV" NAME="death2n" GROUP="Nali" #exec AUDIO IMPORT FILE="..\unrealshare\Sounds\Nali\bowing1a.WAV" NAME="bowing1n" GROUP="Nali" #exec AUDIO IMPORT FILE="..\unrealshare\Sounds\Nali\cringe2a.WAV" NAME="cringe2n" GROUP="Nali" #exec AUDIO IMPORT FILE="..\unrealshare\Sounds\Nali\backup2a.WAV" NAME="backup2n" GROUP="Nali" #exec AUDIO IMPORT FILE="..\unrealshare\Sounds\Nali\cough1na.WAV" NAME="cough1n" GROUP="Nali" #exec AUDIO IMPORT FILE="..\unrealshare\Sounds\Nali\sweat1na.WAV" NAME="sweat1n" GROUP="Nali" #exec AUDIO IMPORT FILE="..\unrealshare\Sounds\Nali\levitF1.WAV" NAME="pray1n" GROUP="Nali" #exec AUDIO IMPORT FILE="..\Unrealshare\Sounds\Cow\walknc.WAV" NAME="walkC" GROUP="Cow" #exec AUDIO IMPORT FILE="..\unrealshare\Sounds\Generic\teleprt27.WAV" NAME="Teleport1" GROUP="Generic" function PlayTurning() { BaseEyeHeight = Default.BaseEyeHeight; PlayAnim('Turn', 0.3, 0.3); } function TweenToWalking(float tweentime) { BaseEyeHeight = Default.BaseEyeHeight; if (Weapon == None) TweenAnim('Walk', tweentime); else if ( Weapon.bPointing || (CarriedDecoration != None) ) TweenAnim('WalkFire', tweentime); else TweenAnim('Walk', tweentime); } function TweenToRunning(float tweentime) { BaseEyeHeight = Default.BaseEyeHeight; if (bIsWalking) TweenToWalking(0.1); else if (Weapon == None) PlayAnim('Run', 1, tweentime); else if ( Weapon.bPointing ) PlayAnim('RunFire', 1, tweentime); else PlayAnim('Run', 1, tweentime); } function PlayWalking() { BaseEyeHeight = Default.BaseEyeHeight; if (Weapon == None) LoopAnim('Walk'); else if ( Weapon.bPointing || (CarriedDecoration != None) ) LoopAnim('WalkFire'); else LoopAnim('Walk'); } function PlayRunning() { BaseEyeHeight = Default.BaseEyeHeight; if (Weapon == None) LoopAnim('Run'); else if ( Weapon.bPointing ) LoopAnim('RunFire'); else LoopAnim('Run'); } function PlayRising() { BaseEyeHeight = 0.4 * Default.BaseEyeHeight; TweenAnim('DuckWalk', 0.7); } function PlayFeignDeath() { local float decision; BaseEyeHeight = 0; PlayAnim('Levitate', 0.3, 1.0); } function PlayDying(name DamageType, vector HitLoc) { local vector X,Y,Z, HitVec, HitVec2D; local float dotp; BaseEyeHeight = Default.BaseEyeHeight; PlayDyingSound(); if ( FRand() < 0.15 ) { PlayAnim('Dead',0.7,0.1); return; } // check for big hit if ( (Velocity.Z > 250) && (FRand() < 0.7) ) { PlayAnim('Dead4', 0.7, 0.1); return; } // check for head hit if ( (DamageType == 'Decapitated') || (HitLoc.Z - Location.Z > 0.6 * CollisionHeight) ) { DamageType = 'Decapitated'; PlayAnim('Dead3', 0.7, 0.1); return; } GetAxes(Rotation,X,Y,Z); HitVec = Normal(HitLoc - Location); dotp = HitVec dot Y; if (dotp > 0.0) PlayAnim('Dead', 0.7, 0.1); else PlayAnim('Dead2', 0.7, 0.1); } //FIXME - add death first frames as alternate takehit anims!!! function PlayGutHit(float tweentime) { if ( AnimSequence == 'GutHit' ) { if (FRand() < 0.5) TweenAnim('LeftHit', tweentime); else TweenAnim('RightHit', tweentime); } else TweenAnim('GutHit', tweentime); } function PlayHeadHit(float tweentime) { if ( AnimSequence == 'HeadHit' ) TweenAnim('GutHit', tweentime); else TweenAnim('HeadHit', tweentime); } function PlayLeftHit(float tweentime) { if ( AnimSequence == 'LeftHit' ) TweenAnim('GutHit', tweentime); else TweenAnim('LeftHit', tweentime); } function PlayRightHit(float tweentime) { if ( AnimSequence == 'RightHit' ) TweenAnim('GutHit', tweentime); else TweenAnim('RightHit', tweentime); } function PlayLanded(float impactVel) { impactVel = impactVel/JumpZ; impactVel = 0.1 * impactVel * impactVel; BaseEyeHeight = Default.BaseEyeHeight; if ( Role == ROLE_Authority ) { if ( impactVel > 0.17 ) PlaySound(LandGrunt, SLOT_Talk, FMin(5, 5 * impactVel),false,1200,FRand()*0.4+0.8); if ( !FootRegion.Zone.bWaterZone && (impactVel > 0.01) ) PlaySound(Land, SLOT_Interact, FClamp(4.5 * impactVel,0.5,6), false, 1000, 1.0); } if ( (GetAnimGroup(AnimSequence) == 'Dodge') && IsAnimating() ) return; if ( (impactVel > 0.06) || (GetAnimGroup(AnimSequence) == 'Jumping') ) TweenAnim('Landed', 0.12); else if ( !IsAnimating() ) { if ( GetAnimGroup(AnimSequence) == 'TakeHit' ) AnimEnd(); else TweenAnim('Landed', 0.12); } } function PlayInAir() { BaseEyeHeight = Default.BaseEyeHeight; TweenAnim('RunFire', 0.4); } function PlayDuck() { BaseEyeHeight = 0; TweenAnim('DuckWalk', 0.25); } function PlayCrawling() { BaseEyeHeight = 0; LoopAnim('DuckWalk'); } function TweenToWaiting(float tweentime) { if( IsInState('PlayerSwimming') || Physics==PHYS_Swimming ) { BaseEyeHeight = 0.7 * Default.BaseEyeHeight; TweenAnim('Tread', tweentime); } else { BaseEyeHeight = Default.BaseEyeHeight; TweenAnim('StilFire', tweentime); } } function PlayWaiting() { local name newAnim; if( IsInState('PlayerSwimming') || (Physics==PHYS_Swimming) ) { BaseEyeHeight = 0.7 * Default.BaseEyeHeight; LoopAnim('Tread'); } else { BaseEyeHeight = Default.BaseEyeHeight; if ( (Weapon != None) && Weapon.bPointing ) TweenAnim('StilFire', 0.3); else { if ( FRand() < 0.2 ) newAnim = 'Cough'; else if ( FRand() < 0.3 ) newAnim = 'Sweat'; else newAnim = 'Breath'; if ( AnimSequence == newAnim ) LoopAnim(newAnim, 0.3 + 0.7 * FRand()); else PlayAnim(newAnim, 0.3 + 0.7 * FRand(), 0.25); } } } function PlayFiring() { // switch animation sequence mid-stream if needed if (AnimSequence == 'Run') AnimSequence = 'RunFire'; else if (AnimSequence == 'Walk') AnimSequence = 'WalkFire'; else if ( (GetAnimGroup(AnimSequence) != 'Attack') && (GetAnimGroup(AnimSequence) != 'MovingAttack') && (GetAnimGroup(AnimSequence) != 'Dodge') && (AnimSequence != 'Swim') ) TweenAnim('StilFire', 0.02); } function PlayWeaponSwitch(Weapon NewWeapon) { } function PlaySwimming() { BaseEyeHeight = 0.7 * Default.BaseEyeHeight; LoopAnim('Swim'); } function TweenToSwimming(float tweentime) { BaseEyeHeight = 0.7 * Default.BaseEyeHeight; TweenAnim('Swim',tweentime); } function SwimAnimUpdate(bool bNotForward) { if ( !bAnimTransition && (GetAnimGroup(AnimSequence) != 'Gesture') && (AnimSequence != 'Swim') ) TweenToSwimming(0.1); } function NormallyVisible() { bHidden = false; Style = STY_Normal; ScaleGlow = 1.0; } state FeigningDeath { ignores SeePlayer, HearNoise, Bump, Fire, AltFire; event PlayerTick( float DeltaTime ) { Super.PlayerTick(DeltaTime); if ( (Role == ROLE_Authority) && !IsAnimating() && !bHidden ) { Style = STY_Translucent; ScaleGlow -= DeltaTime; if ( ScaleGlow < 0.3 ) bHidden = true; } } function PlayTakeHit(float tweentime, vector HitLoc, int Damage) { NormallyVisible(); Global.PlayTakeHit(tweentime, HitLoc, Damage); } function PlayDying(name DamageType, vector HitLocation) { NormallyVisible(); Global.PlayDying(DamageType, HitLocation); } function Landed(vector HitNormal) { NormallyVisible(); Super.Landed(HitNormal); } function EndState() { Super.EndState(); if ( (Role == ROLE_Authority) && !bHidden && (Style == STY_Translucent) ) NormallyVisible(); } } state PlayerSwimming { ignores SeePlayer, HearNoise, Bump; function BeginState() { Super.BeginState(); NormallyVisible(); } } state PlayerWalking { ignores SeePlayer, HearNoise, Bump; exec function Fire( optional float F ) { NormallyVisible(); Super.Fire(F); } function TakeDamage( int Damage, Pawn instigatedBy, Vector hitlocation, Vector momentum, name damageType) { NormallyVisible(); Super.TakeDamage(Damage, instigatedBy, hitlocation, momentum, damageType); } function ProcessMove(float DeltaTime, vector NewAccel, eDodgeDir DodgeMove, rotator DeltaRot) { Super.ProcessMove(DeltaTime, NewAccel, DodgeMove, DeltaRot); if ( (Role == ROLE_Authority) && (Style == STY_Translucent) ) { ScaleGlow = VSize(Velocity)/GroundSpeed; bHidden = (ScaleGlow < 0.35); } } function EndState() { NormallyVisible(); Super.EndState(); } } defaultproperties { drown=Sound'UnrealShare.Male.MDrown1' breathagain=Sound'UnrealShare.Male.MGasp1' Footstep1=Sound'UnrealShare.Cow.walkC' Footstep2=Sound'UnrealShare.Cow.walkC' Footstep3=Sound'UnrealShare.Cow.walkC' HitSound3=Sound'UnrealShare.Nali.injur1n' HitSound4=Sound'UnrealShare.Nali.injur2n' Die2=Sound'UnrealShare.Nali.death2n' Die3=Sound'UnrealShare.Nali.death2n' Die4=Sound'UnrealShare.Nali.death2n' GaspSound=Sound'UnrealShare.Male.MGasp2' UWHit1=Sound'UnrealShare.Male.MUWHit1' UWHit2=Sound'UnrealShare.Male.MUWHit2' LandGrunt=Sound'UnrealShare.Male.lland01' CarcassType=Class'UnrealShare.NaliCarcass' JumpSound=Sound'UnrealShare.Male.MJump1' bSinglePlayer=False GroundSpeed=320.000000 JumpZ=360.000000 BaseEyeHeight=32.000000 EyeHeight=32.000000 Health=80 HitSound1=Sound'UnrealShare.Nali.fear1n' HitSound2=Sound'UnrealShare.Nali.cringe2n' Die=Sound'UnrealShare.Nali.death1n' MenuName="Nali" Skin=Texture'UnrealShare.Skins.JNali1' Mesh=LodMesh'UnrealI.Nali2' CollisionRadius=24.000000 CollisionHeight=48.000000 Buoyancy=98.000000 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |