34 lines
719 B
Plaintext
34 lines
719 B
Plaintext
|
void dyingeffect(int AmmountToBleed)
|
||
|
{
|
||
|
object oPlayerDying = GetLastPlayerDying();
|
||
|
int CurrentHPs = GetCurrentHitPoints(oPlayerDying);
|
||
|
int toggle = 0;
|
||
|
object Death = GetItemPossessedBy(oPlayerDying, "death");
|
||
|
|
||
|
if(CurrentHPs > 0)
|
||
|
{
|
||
|
toggle = 1;
|
||
|
SetCampaignInt("p_death","is_dead",FALSE,oPlayerDying);
|
||
|
}
|
||
|
|
||
|
if(CurrentHPs <= 0)
|
||
|
{
|
||
|
toggle = 1;
|
||
|
effect KillPlayer = EffectDeath();
|
||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, KillPlayer, oPlayerDying);
|
||
|
}
|
||
|
|
||
|
if(toggle != 1)
|
||
|
{
|
||
|
DelayCommand(1.0, dyingeffect(1));
|
||
|
}
|
||
|
}
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
object DyingPerson = GetLastPlayerDying();
|
||
|
|
||
|
SetLocalInt(DyingPerson, "dying", 1);
|
||
|
DelayCommand(1.0, dyingeffect(1));
|
||
|
}
|