• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Spell] Whats Wrong with This Trigger

Status
Not open for further replies.
Level 5
Joined
Feb 6, 2011
Messages
177
hello hivers
i am making a map in which i have a hero which is the spirit walker, i am making his first ability has an AOE effect anyway , here is the description of it :

Soul Vengance :
the Spirit Walker Creates Evil Souls in a Targeted Area to attack the Enemies in it, the number of summoned Souls equals the number of enemy units in the area.
the souls attack the enemies and disappear, Damage Dealt equal 100 and adds 100 additional damage each level
at level 10 full soul damage reaches 1000

i have created the dummy of the soul which is basically "Spirit of Vengence" unit in warcraft and here is the trigger.
the problem is that nothing happens whenever i use the spell on the area. any ideas ?!?!?
+Rep Thank you in advance
  • Vengance
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Soul Vengance [S]
    • Actions
      • Set SV_caster = (Casting unit)
      • Set SV_Area = (Target point of ability being cast)
      • Unit Group - Pick every unit in (Units within 512.00 of SV_Area matching ((Owner of (Picked unit)) Equal to Neutral Hostile)) and do (Actions)
        • Loop - Actions
          • Unit - Create 1 DummySoul for (Owner of SV_caster) at (Position of (Picked unit)) facing Default building facing degrees
          • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
          • Animation - Play (Last created unit)'s attack animation
          • Unit - Cause SV_caster to damage (Picked unit), dealing (100.00 x (Real((Level of Soul Vengance [S] for SV_caster)))) damage of attack type Spells and damage type Normal
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
It leaks group. Use "set bj_wantDestroyGroup = true" before the "Pick every unit..."

You can use Triggering Unit instead of Casting Unit, it's better.

If it doesn't work, it's probably because the picked units aren't owned by Neutral Hostile. You have to add the "Unit is Alive" and "Owner of Picked Unit is an Ally of Owner of Triggering Unit = False" conditions to the group.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
  • Unit Group - Pick every unit in (Units within 512.00 of SV_Area matching ((Owner of (Picked unit)) Equal to Neutral Hostile)) and do (Actions)
It should be ((Owner of (Matching unit) Equal to Neutral Hostile))

Do you only have Neutral Hostile as your enemy in your map ?
If not, better use this Boolean Comparison;
  • Unit Group - Pick every unit in (Units within 512.00 of SV_Area matching (((Matching unit) belongs to an enemy of (Triggering player)) Equal to True)) and do (Actions)
It's under Boolean Comparison - Unit - Unit Belong To An Enemy Of Player

It will detect every enemies you contacted with, such as Player 2 and Player 3 (provided that they are your enemies)
 
Level 5
Joined
Feb 6, 2011
Messages
177
It should be ((Owner of (Matching unit) Equal to Neutral Hostile))

Do you only have Neutral Hostile as your enemy in your map ?
If not, better use this Boolean Comparison;
  • Unit Group - Pick every unit in (Units within 512.00 of SV_Area matching (((Matching unit) belongs to an enemy of (Triggering player)) Equal to True)) and do (Actions)
It's under Boolean Comparison - Unit - Unit Belong To An Enemy Of Player

It will detect every enemies you contacted with, such as Player 2 and Player 3 (provided that they are your enemies)

all the enemies in the map are neutral hostile, i did all this but still it didnt work and i added the custom script to manage the leak in the upper comment but still it didnt work , nothing works i dont know why
any ideas ??!?!?!:vw_wtf:
 
Level 5
Joined
Sep 28, 2010
Messages
75
Where did it go wrong ?
I'm curious.

this.
  • Unit Group - Pick every unit in (Units within 512.00 of SV_Area matching (((Matching unit) belongs to an enemy of (Triggering player)) Equal to True)) and do (Actions)
should be:
  • Unit Group - Pick every unit in (Units within 512.00 of SV_Area matching (((Matching unit) belongs to an enemy of (Owner of SV_Caster)) Equal to True)) and do (Actions)
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
So you are him, in a new account ?
Dafuq.

Just so you know, (Triggering player) = (Owner of (Triggering unit))

Don't believe it ?
Test it :)

The reason I used (Triggering player) is because it uses 1 function call GetTriggerPlayer() instead 2 GetOwningPlayer(GetTriggerUnit()), you see ?
 
Level 5
Joined
Sep 28, 2010
Messages
75
So you are him, in a new account ?

i am who, in a what account? I don't know who you're talking about but i signed up a long time ago, and that is the only proof i have.

Just so you know, (Triggering player) = (Owner of (Triggering unit))

Tested it and it actually works. Funny that i never realized it before. i only use triggering player for chat message events. You're right about that part.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
i am who, in a what account? I don't know who you're talking about but i signed up a long time ago, and that is the only proof i have.
I'm asking him where did it go wrong, and why you answered that >.>"
That's why I'm curious if are you = him, logged into new account.

Tested it and it actually works. Funny that i never realized it before. i only use triggering player for chat message events. You're right about that part.
However, there are certain cases which (Triggering player) does not work, such as Event with Unit - Unit Enters Region Event.

You must use (Owner of (Triggering unit)) for that.
 
Level 5
Joined
Sep 28, 2010
Messages
75
well, i am just trying to help spot where did it go wrong, so if i offended you in any way, my apologies.

However, there are certain cases which (Triggering player) does not work, such as Event with Unit - Unit Enters Region Event.

You must use (Owner of (Triggering unit)) for that.
Thank you for that bit of information. :)
 
Level 5
Joined
Feb 6, 2011
Messages
177
It should be ((Owner of (Matching unit) Equal to Neutral Hostile))

Do you only have Neutral Hostile as your enemy in your map ?
If not, better use this Boolean Comparison;
  • Unit Group - Pick every unit in (Units within 512.00 of SV_Area matching (((Matching unit) belongs to an enemy of (Triggering player)) Equal to True)) and do (Actions)
It's under Boolean Comparison - Unit - Unit Belong To An Enemy Of Player

It will detect every enemies you contacted with, such as Player 2 and Player 3 (provided that they are your enemies)

defskul , sorry for late response but this is the exact problem that prevented it from triggering
done it your way the first time but didnt remove the first code so it didnt work :) posted took an another look and found out that the error was because i ddnt delete the old part, done it your way and yaaay it triggered , thx mate , oh and btw i dont have any other accounts . only this one :)
cheers,:goblin_boom:
 
Status
Not open for further replies.
Top