Jump to content

SetAVHealth script help


TheSkoomaKing

Recommended Posts

scriptname UniqueFightScript extends Actor

event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, \
 bool abBashAttack, bool abHitBlocked)
      int currentHealth = self.getav("health")
      if( currentHealth <= self.getbaseav("health") * 0.2)
             self.stopcombat()
      endif
endEvent

 

Try this.

Edited by Sjogga
Link to comment
Share on other sites

scriptname UniqueFightScript extends Actor

event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, \
 bool abBashAttack, bool abHitBlocked)
      int currentHealth = self.getav("health")
      if( currentHealth <= self.getbaseav("health") * 0.2)
             self.stopcombat()
      endif
endEvent

 

Try this.

 

 

Thank you so much for taking your time. i will test it right when i get home. I will contact you later about the result :)

Link to comment
Share on other sites

  • 2 weeks later...
scriptname UniqueFightScript extends Actor

event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
if getAVPercentage("health") <= 0.2
	stopcombat()
endif
endEvent

Link to comment
Share on other sites

  • Recently Browsing   0 members

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