Initial Upload
Initial Upload
This commit is contained in:
33
_module/nss/m_onplayerdying.nss
Normal file
33
_module/nss/m_onplayerdying.nss
Normal file
@@ -0,0 +1,33 @@
|
||||
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));
|
||||
}
|
||||
Reference in New Issue
Block a user