Need Help with death count script

Post » Tue Dec 15, 2015 11:11 am

Hi all I am trying to write a script that counts how many Hell Knight's the player has killed and when the player has killed 6 Hell Knights the script gives the player summon Hell Knight Spell. The script I have saves with no errors. But when I kill six Hell Knights The script does not add the spell to the player :(. Can someone have a look and help me out please?

Scriptname HellKnightDeathScript extends Actor  Int Property HKDeadCount  Auto  SPELL Property HKS  Auto  Event OnDeath(Actor akKiller)	If HKDeadCount != 2 		 HKDeadCount += 1	ElseIf HKDeadCount== 2  		Game.GetPlayer().addspell (HKS)	EndIfEndEvent

Thanks

P.S. I have set the HKDeadCount INT to 2 for testing purposes

User avatar
Sammi Jones
 
Posts: 3407
Joined: Thu Nov 23, 2006 7:59 am

Return to V - Skyrim