Ally/Enemy Spell

ramodkk

New Member
Reaction score
0
Hey guys I want to make a spell that heals targeted unit if it is an ally and deals damage if it is a foe. How would you go about doing that?

Thanks :D
 

Kiddo

New Member
Reaction score
12
Make a spell .. add a trigger that checks if targeted unit is ally/foe ...

If ally => heal x.
If foe => deal x damage.

Kiddo.
 

Nexor

...
Reaction score
74
You have to trigger it, or use death coil if you are an undead unit and the enemy is a non-undead
 

ramodkk

New Member
Reaction score
0
Oh yeah lol, I meant what code to use. I can't find the variable that checks if triggering unit is ally or enemy.

Thanks for the input :D
 

Kiddo

New Member
Reaction score
12
Like this?
Code:
Trigger 1
    Events
        Unit - A unit Begins casting an ability
    Conditions
        ((Owner of (Targeted unit)) is an ally of Player 1 (Red)) Equal to True
    Actions

Uhm, Boolean > Player > Player is an Ally/Enemy of > Owner of Unit. :)

Kiddo.
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top