Добавлен Karp,
опубликован
Простенький скрипт который надо запихнуть в свой Pawn что бы было слышно сердцебиение когда здоровье падает меньше 25%, планка настраивается в строках
if (Health <= 25)
if (Health > 25)
if (Health > 25)
class MyNewPawn extends UTPawn;
var AudioComponent HealthSound;
event TakeDamage(int Damage, Controller EventInstigator, vector HitLocation, vector Momentum, class<DamageType> DamageType, optional TraceHitInfo HitInfo, optional Actor DamageCauser)
{
super.TakeDamage(Damage, EventInstigator, HitLocation, Momentum, DamageType, HitInfo, DamageCauser);
if (Health <= 25)
{
HealthSound.Play();
}
if (Health < 1)
{
HealthSound.Stop();
}
}
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)
}
`
ОЖИДАНИЕ РЕКЛАМЫ...
Чтобы оставить комментарий, пожалуйста, войдите на сайт.
http://romerounrealscript.blogspot.com/2012/01/camera-class-unre...