// // CPT operator / SondeerGame // This source file is (c) by Deltares. // - October 2014 // //============================================================================= // Sheep, animated and making sounds. // ------------------------------------------------------------ // Created by Maarten Wesselius // © 2007, Geodelft // // Date Id Modification // 200?-??-?? gui Class created // 2007-11-01 Wsl Sound functionality moved to GeoTimedSoundObject //============================================================================= class GeoSheep extends GeoAnimal; var name NeckAnim; var name NoseAnim; var name ScratchAnim; var name DanceAnim; //var GeoTimedSoundObject soundObject; var (Sound) float AverageSecondsBetween; var (Sound) float MaxDeviation; event PreBeginPlay() { //SetTimer(timerInterval, true); //determineNextWaitingTime(1.0); InitSound(); SetPhysics(PHYS_Falling); } //============================================================================= // Init sound object, associated sounds and configurable sound variables. // // Date Id Modification // 2006-10-11 Wsl Created this header //============================================================================= function InitSound() { /* local array arr; soundObject = Spawn(class'GeoTimedSoundObject', self); soundObject.SetAverageSecondsBetween(AverageSecondsBetween); soundObject.SetMaxDeviation(MaxDeviation); arr.length = 13; arr[0]=Sound'GeoNatureSounds.sheep.sheep1'; arr[1]=Sound'GeoNatureSounds.sheep.sheep2'; arr[2]=Sound'GeoNatureSounds.sheep.sheep3'; arr[3]=Sound'GeoNatureSounds.sheep.sheep4'; arr[4]=Sound'GeoNatureSounds.sheep.sheep5'; arr[5]=Sound'GeoNatureSounds.sheep.sheep6'; arr[6]=Sound'GeoNatureSounds.sheep.sheep7'; arr[7]=Sound'GeoNatureSounds.sheep.sheep8'; arr[8]=Sound'GeoNatureSounds.sheep.sheep9'; arr[9]=Sound'GeoNatureSounds.sheep.sheep10'; arr[10]=Sound'GeoNatureSounds.sheep.sheep11'; arr[11]=Sound'GeoNatureSounds.sheep.sheep12'; arr[12]=Sound'GeoNatureSounds.sheep.sheep13'; soundObject.SetSounds(arr); */ } simulated function PlayWaiting() { local int Random; local float rate; rate = RandRange(0.7,1.1); if(Physics == PHYS_Falling) LoopAnim(FallingAnim, rate, 0.2); else if(Physics == PHYS_Flying) LoopAnim(FlyIdle, rate, 0.2); else if(Physics == PHYS_Swimming) LoopAnim(SwimIdle, rate, 0.2); else { if(bIsCrouched) LoopAnim(CrouchIdle, rate, 0.2); else { Random = Rand(100); if(Random<15) LoopAnim(NeckAnim, rate, 0.2); else if(Random<30) LoopAnim(NoseAnim, rate, 0.2); else if(Random<45) LoopAnim(ScratchAnim, rate, 0.2); else if(Random<50) LoopAnim(DanceAnim, rate, 0.2); else LoopAnim(StandIdle, rate, 0.2); } } } defaultproperties { // Mesh=SkeletalMesh'AnimalsA.Sheep' Mesh=SkeletalMesh'AnimalA.Sheep' TransientSoundRadius=50.0 TransientSoundVolume=0.8 AverageSecondsBetween=18.0 MaxDeviation=5.0 RunningAnims[0]="Walk" RunningAnims[1]="Walk" RunningAnims[2]="Walk" RunningAnims[3]="Walk" WalkingAnims[0]="Walk" WalkingAnims[1]="Walk" WalkingAnims[2]="Walk" WalkingAnims[3]="Walk" CrouchAnims[0]="Walk" CrouchAnims[1]="Walk" CrouchAnims[2]="Walk" CrouchAnims[3]="Walk" FlyingAnims[0]="Walk" FlyingAnims[1]="Walk" FlyingAnims[2]="Walk" FlyingAnims[3]="Walk" SwimmingAnims[0]="Walk" SwimmingAnims[1]="Walk" SwimmingAnims[2]="Walk" SwimmingAnims[3]="Walk" StandingTurnAnims[0]="Idle" StandingTurnAnims[1]="Idle" CrouchTurnAnims[0]="Idle" CrouchTurnAnims[1]="Idle" StandIdle="Idle" CrouchIdle="Idle" FlyIdle="Idle" SwimIdle="Idle" JumpStandingAnim="Idle" JumpMovingAnim="Walk" LandAnim="Idle" FallingAnim="Idle" NeckAnim="Idle" NoseAnim="Idle" ScratchAnim="Idle" DanceAnim="Idle" BaseEyeHeight=64 CollisionRadius=+00075.000000 CollisionHeight=+00058.000000 CrouchHeight=+58.0 WalkingPct=+0.12 }