Cannot target what I want <_<

Mezion

New Member
Reaction score
0
I'm simply trying to make a spell that damage my ennemies, and not myself and my allies but cannot find how to do that! So far I got:

Set Temp_Group[0] = (Units within 250.00 of (Target point of ability being cast) matching ((Owner of (Matching unit) :confused: I cannot find anything better in the choice :( ) Not equal to (Owner of (Triggering unit))))

Unit - Cause (Last created unit) to damage circular area after 0.00 seconds of radius 200.00 at (Position of (Last created unit)), dealing (0.60 x (Real(intStr[0]))) damage of attack type Normal and damage type Normal.

How could this be corrected.
Ty for any help ^___^
 

ZiggyMcjoney

Data editor?! AAAHHHHH!
Reaction score
95
Don't use "Damage Circular Area". What you've done here is made a unit group, but haven't even used it!

Try this:

Change the Temp_Group[0] variable to:

Code:
Set Temp_Group[0] = (Units within 250.00 of (Target point of ability being cast) matching ((Owner of (Matching unit) belongs to an enemy of (Owner of (Triggering unit))))

"Unit belongs to an enemy of player" is a Boolean comparison.

Then, add this function:

Code:
Pick every unit in Temp_Group[0] and do:

and then, inside that loop, add the Unit - Damage Target function. NOT Damage Circular area!

Code:
Unit - Cause (Triggering unit) to damage ([B]Picked unit[/B]), dealing <yourdamage> damage of attack type Spells and damage type Normal

Then, don't forget to remove the leak (do this OUTSIDE the loop):

Code:
Custom Script: call DestroyGroup(udg_Temp_Group[0])

What event are you using for this trigger?

Also, does the ability target a point, or does it target a unit? Depending on what it's targeting, you may have to change your trigger slightly.
 

Nenad

~Choco Coronet~ Omnomnom
Reaction score
137
Set TempPoint= Target position of ability being cast
Set Temp_Group[0] = (Units within 250.00 of TempPoint matching ((Owner of (Matching unit) equal to (Enemy of Owner of (Casting Unit))))<---boolean
Custom Script call RemoveLocation(udg_TempPoint)
Custom Script call DestroyGroup(udg_TempGroup)

Set TempPoint= Position of (Last created unit)
Unit - Cause (Last created unit) to damage circular area after 0.00 seconds of radius 200.00 at TempPoint, dealing (0.60 x (Real(intStr[0]))) damage of attack type Normal and damage type Normal.
Custom Script call RemoveLocation(udg_TempPoint)
There ^^


Trigger:
  • Unit - Cause (Triggering unit) to damage (Picked unit), dealing &lt;yourdamage&gt; damage of attack type Spells and damage type Normal

This may crash your game, care when you use this function ^^

And yeah, what's with the setting of group? I just assumed it's for another trigger (cause of the space)
 

Bogrim

y hello thar
Reaction score
154
Boolean comparison - Unit classification check - (Matching unit) is A flying unit Equal to False.

You can insert multiple conditions in your unit group variable action by using "And" (at the bottom of the list).
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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