Jump to content

Why is this script slow to react?


Recommended Posts

This time gap is probably the reason why vanilla scripts (for example "defaultGhostScript")

are using OnDying() instead of OnDeath() event.

 

The dying event is triggered aprox. 2 seconds before death event comes true.

 

 

 

  Explosion PROPERTY MyBang auto      ; explosion like fire attronach to show damage
  Message   PROPERTY MyMSG  auto

EVENT OnDying(Actor akKiller)
    IF (akKiller == Game.GetPlayer())
        myF_Action(akKiller)
    ENDIF
ENDEVENT


FUNCTION myF_Action(Actor player)
;--------------------------------
    self.PlaceAtMe(MyBang)                       ; exlosion near of skeever corpse
    player.DamageActorValue("Health", 50)        ; let the player damage by 50 hit points
    MyMSG.show()
ENDFUNCTION

 

 

Edited by ReDragon2013
Link to comment
Share on other sites

Well...well...well... every day you learn something new...


I didn't know about this, and i was wondering for quite some time what's the actual and fundamental difference between "OnDying() vs OnDeath()".


Thanks once again ReDragon...

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...