I have already added a cloak spell to player that may affect all NPC nearby
but I just want bandit to be affected.
Here is my code
Class Property EncClassBanditMelee Auto
Spell Property Myspell Auto
Event OnEffectStart(Actor akTarget, Actor akCaster)
ActorBase TargetBase = akTarget.GetBaseObject() as ActorBase
Class TargetClass = TargetBase.GetClass()
if TargetClass == EncClassBanditMelee
akTarget.AddSpell(Myspell)
endIf
EndEvent
Then I try the three bandit in the Bleak Falls Barrow, it dosn't work, Is that means the three bandit in the Bleak Falls Barrow are't EncBandit, or there is something wrong in my code
btw...my spell will add to Stump( the dog in Riverwood ) , so the dog is also a bandit