Jump to content

Spell Script - Check if the target is currently attacking the caster?


Recommended Posts

Hey all,

 

I'm working on a spell script to draw "aggro", but I only want it to work on targets who are NOT attacking the caster. What condition/variable do I need to use for this?

Scriptname AggroScript extends activemagiceffect  

function OnEffectStart(Actor akTarget, Actor akCaster)
    akTarget.StopCombat()
    akTarget.StartCombat(akCaster)
endFunction

Thank you!

 

Edit: A way to check if the target is currently attacking the player would work as well, if that's easier.

Edited by letmedownloadjeez
Link to comment
Share on other sites

 

>I'm working on a spell script to draw "aggro", but I only want it to work on targets who are NOT attacking the caster

Why? If it makes them attack the player, the player wont know who was affected and who wasn't. Is there more to this

Oops, let me clarify. This spell won't be used by the player, but a follower, so that the enemies will attack them instead of the player.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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