Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class EngagePawn extends UTPawn;
- var bool bCanDodge;
- var AudioComponent HealthSound;
- var EngageGFxHUD EngageGFxHUD;
- function bool Dodge(eDoubleClickDir DoubleClickMove)
- {
- if(bCanDodge)
- return super.Dodge(DoubleClickMove);
- return false;
- }
- function AddDefaultInventory()
- {
- InvManager.CreateInventory(class'UTGame.Carabine_Weapon');
- }
- event TakeDamage(int DamageAmount, Controller EventInstigator, vector HitLocation, vector Momentum, class<DamageType> DamageType, optional TraceHitInfo HitInfo, optional Actor DamageCauser)
- {
- EngageGFxHUD = EngageGFxHUD(Owner);
- super.TakeDamage(DamageAmount, EventInstigator, HitLocation, Momentum, DamageType, HitInfo, DamageCauser);
- if (Health <= 25)
- {
- HealthSound.Play(); //PLAY HEARTBEAT SOUND
- }
- if (Health < 100)
- {
- HUD.Bloodsplatter(true); //SHOW BLOOD SPLAAATTTEERRRR
- }
- }
- function Tick(float DeltaTime)
- {
- Super.Tick(DeltaTime);
- if (Health > 25)
- HealthSound.Stop();
- }
- simulated event Destroyed()
- {
- HealthSound = None;
- super.Destroyed();
- }
- defaultproperties
- {
- Begin Object class=AudioComponent name=MenuAudioComponent
- SoundCue = SoundCue'Sounds.Misc.Heartbeat_Cue'
- End Object
- HealthSound = MenuAudioComponent
- Components.Add(MenuAudioComponent)
- Begin Object Class=SkeletalMeshComponent Name=EPawnSkeletalMeshComponent
- bCacheAnimSequenceNodes=FALSE
- AlwaysLoadOnClient=true
- AlwaysLoadOnServer=true
- bOwnerNoSee=true
- CastShadow=true
- BlockRigidBody=TRUE
- bUpdateSkelWhenNotRendered=false
- bIgnoreControllersWhenNotRendered=TRUE
- bUpdateKinematicBonesFromAnimation=true
- bCastDynamicShadow=true
- Translation=(Z=8.0)
- RBChannel=RBCC_Untitled3
- RBCollideWithChannels=(Untitled3=true)
- LightEnvironment=MyLightEnvironment
- bOverrideAttachmentOwnerVisibility=true
- bAcceptsDynamicDecals=FALSE
- AnimTreeTemplate=AnimTree'Engage_Soldier.Anims.Soldier_AnimTree'
- bHasPhysicsAssetInstance=true
- TickGroup=TG_PreAsyncWork
- MinDistFactorForKinematicUpdate=0.2
- bChartDistanceFactor=true
- //bSkipAllUpdateWhenPhysicsAsleep=TRUE
- RBDominanceGroup=20
- Scale=1.075
- // Nice lighting for hair
- bUseOnePassLightingOnTranslucency=TRUE
- bPerBoneMotionBlur=true
- End Object
- Mesh=EPawnSkeletalMeshComponent
- Components.Add(EPawnSkeletalMeshComponent)
- //Add Sounds Here. Hit Sound, Jump Sound etc. Lookup: UTPawnSoundGroup_Liandri.uc file
- SoundGroupClass=None
- InventoryManagerClass=class'EngageInventoryManager'
- MaxMultiJump=0 //Set this to 1 to enable Double Jump
- bCanDodge=false //Set this to true to enable Dodging
- EngageGFxHUD = EngageGFxHUD(Owner);
- }
Add Comment
Please, Sign In to add comment