• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Global "Soul Burn" spell wont affect units that aren't in vision...

Status
Not open for further replies.
Level 14
Joined
Jul 19, 2007
Messages
772
I have made a spell in my map that works like a global "Soul Burn" which means it should affect all enemies in the map but it wont affect units that aren't in vision for some reason. What's wrong?

  • Curse of Mirkwood
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Curse of Mirkwood
    • Actions
      • Set VariableSet GroupMirkwoodCurse = (Units in (Playable map area))
      • Unit Group - Pick every unit in GroupMirkwoodCurse and do (Actions)
        • Loop - Actions
          • Set VariableSet TempPoint = (Position of (Picked unit))
          • Unit - Create 1 Spell Cast Dummy (Curse of Mirkwood) for (Owner of (Triggering unit)) at (Position of (Picked unit)) facing Default building facing degrees
          • Unit - Add Curse of Mirkwood (Dummy Spell) to (Last created unit)
          • Unit - Set level of Curse of Mirkwood (Dummy Spell) for (Last created unit) to (Level of Curse of Mirkwood for Thranduil 0380 <gen>)
          • Unit - Order (Last created unit) to Neutral Fire Lord - Soul Burn (Picked unit)
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation (udg_TempPoint)
      • Custom script: call DestroyGroup (udg_GroupMirkwoodCurse)
 
Level 14
Joined
Jul 19, 2007
Messages
772
I believe credit will work if you change the owner of the dummy after it has cast the ability
I tried it but the spell seems to work only the first time it's used but it doesn't work the second time it's used and so on...
This is how I made it.
  • Curse of Mirkwood
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Curse of Mirkwood
    • Actions
      • Set VariableSet GroupMirkwoodCurse = (Units in (Playable map area))
      • Unit Group - Pick every unit in GroupMirkwoodCurse and do (Actions)
        • Loop - Actions
          • Set VariableSet TempPoint = (Position of (Picked unit))
          • Unit - Create 1 Spell Cast Dummy (Curse of Mirkwood) for Player 12 (Brown) at (Position of (Picked unit)) facing Default building facing degrees
          • Unit - Add Curse of Mirkwood (Dummy Spell) to (Last created unit)
          • Unit - Set level of Curse of Mirkwood (Dummy Spell) for (Last created unit) to (Level of Curse of Mirkwood for Thranduil 0380 <gen>)
          • Unit - Order (Last created unit) to Neutral Fire Lord - Soul Burn (Picked unit)
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Change ownership of (Last created unit) to (Owner of Thranduil 0380 <gen>) and Change color
          • Custom script: call RemoveLocation (udg_TempPoint)
      • Custom script: call DestroyGroup (udg_GroupMirkwoodCurse)
 

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,690
Set your trigger up like this:
  • Curse of Mirkwood
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Curse of Mirkwood
    • Actions
      • Set VariableSet TempPoint = (Position of (Triggering unit))
      • Unit - Create 1 Spell Cast Dummy (Curse of Mirkwood) for (Triggering player) at TempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation (udg_TempPoint)
      • Set VariableSet CurseDummy = (Last created unit)
      • Unit - Add Curse of Mirkwood (Dummy Spell) to CurseDummy
      • Unit - Set level of Curse of Mirkwood (Dummy Spell) for CurseDummy to (Level of Curse of Mirkwood for Thranduil 0380 <gen>
      • Unit - Add a 0.40 second Generic expiration timer to CurseDummy
      • Set VariableSet GroupMirkwoodCurse = (Units in (Playable map area))
      • Unit Group - Pick every unit in GroupMirkwoodCurse and do (Actions)
        • Loop - Actions
          • Unit - Order CurseDummy to Neutral Fire Lord - Soul Burn (Picked unit)
      • Custom script: call DestroyGroup (udg_GroupMirkwoodCurse)
Also, make sure the ability has a 0 second cooldown, 999999 cast range, and 0 mana cost.
Then make sure the Dummy unit has a 0.00 Cast Point / Cast Backswing and Movement Type = None.

Why do all of this:
1) You only need one Dummy unit to cast a spell multiple times.
2) You were never referencing TempPoint.
3) (Last created unit) is unreliable, you should track the Dummy in a unit variable.
4) The expiration timer doesn't need to be long. The unit is going to cast the spell(s) with at most a 1 frame delay if any.

Also, you probably want to filter GroupMirkwoodCurse better. It's currently adding dead units, invulnerable units, structures, and spell immune units to the Unit Group.
 
Last edited:
Level 14
Joined
Jul 19, 2007
Messages
772
Set your trigger up like this:
  • Curse of Mirkwood
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Curse of Mirkwood
    • Actions
      • Set VariableSet TempPoint = (Position of (Triggering unit))
      • Unit - Create 1 Spell Cast Dummy (Curse of Mirkwood) for (Triggering player) at TempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation (udg_TempPoint)
      • Set VariableSet CurseDummy = (Last created unit)
      • Unit - Add Curse of Mirkwood (Dummy Spell) to CurseDummy
      • Unit - Set level of Curse of Mirkwood (Dummy Spell) for CurseDummy to (Level of Curse of Mirkwood for Thranduil 0380 <gen>
      • Unit - Add a 0.40 second Generic expiration timer to CurseDummy
      • Set VariableSet GroupMirkwoodCurse = (Units in (Playable map area))
      • Unit Group - Pick every unit in GroupMirkwoodCurse and do (Actions)
        • Loop - Actions
          • Unit - Order CurseDummy to Neutral Fire Lord - Soul Burn (Picked unit)
      • Custom script: call DestroyGroup (udg_GroupMirkwoodCurse)
Also, make sure the ability has a 0 second cooldown, 999999 cast range, and 0 mana cost.
Then make sure the Dummy unit has a 0.00 Cast Point / Cast Backswing and Movement Type = None.

Why do all of this:
1) You only need one Dummy unit to cast a spell multiple times.
2) You were never referencing TempPoint.
3) (Last created unit) is unreliable, you should track the Dummy in a unit variable.
4) The expiration timer doesn't need to be long. The unit is going to cast the spell(s) with at most a 1 frame delay if any.

Also, you probably want to filter GroupMirkwoodCurse better. It's currently adding dead units, invulnerable units, structures, and spell immune units to the Unit Group.
I tried everything but it doesn't seems to work. It won't affect enemy heroes that aren't in vision and sometimes it seems to only affect 1 of the enemy heroes with the "Soul Burn" effect...
 

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,690
Make sure your trigger looks EXACTLY like this:
  • Curse of Mirkwood
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Curse of Mirkwood
    • Actions
      • Set VariableSet TempPoint = (Position of (Triggering unit))
      • Set VariableSet MirkwoodCursePlayer = (Owner of (Triggering unit))
      • Unit - Create 1 Spell Cast Dummy (Curse of Mirkwood) for MirkwoodCursePlayer at TempPoint facing Default building facing degrees
      • Set VariableSet MirkwoodCurseDummy = (Last created unit)
      • Unit - Add Curse of Mirkwood (Dummy Spell) to MirkwoodCurseDummy
      • Unit - Set level of Curse of Mirkwood (Dummy Spell) for MirkwoodCurseDummy to (Level of Curse of Mirkwood for (Triggering unit))
      • Unit - Add a 0.40 second Generic expiration timer to MirkwoodCurseDummy
      • Set VariableSet GroupMirkwoodCurse = (Units within 1000000000.00 of TempPoint matching ((((Owner of (Matching unit)) is an enemy of MirkwoodCursePlayer.) Equal to True) and ((((Matching unit) is A Hero) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit)
      • Unit Group - Pick every unit in GroupMirkwoodCurse and do (Actions)
        • Loop - Actions
          • Unit - Grant shared vision of (Picked unit) to MirkwoodCursePlayer
          • Unit - Order MirkwoodCurseDummy to Neutral Fire Lord - Soul Burn (Picked unit)
          • Unit - Deny shared vision of (Picked unit) to MirkwoodCursePlayer
      • Custom script: call RemoveLocation (udg_TempPoint)
      • Custom script: call DestroyGroup (udg_GroupMirkwoodCurse)
Also, I recommend basing your Dummy units off of the Locust rather than a Wisp.
 
Level 14
Joined
Jul 19, 2007
Messages
772
Make sure your trigger looks EXACTLY like this:
  • Curse of Mirkwood
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Curse of Mirkwood
    • Actions
      • Set VariableSet TempPoint = (Position of (Triggering unit))
      • Set VariableSet MirkwoodCursePlayer = (Owner of (Triggering unit))
      • Unit - Create 1 Spell Cast Dummy (Curse of Mirkwood) for MirkwoodCursePlayer at TempPoint facing Default building facing degrees
      • Set VariableSet MirkwoodCurseDummy = (Last created unit)
      • Unit - Add Curse of Mirkwood (Dummy Spell) to MirkwoodCurseDummy
      • Unit - Set level of Curse of Mirkwood (Dummy Spell) for MirkwoodCurseDummy to (Level of Curse of Mirkwood for (Triggering unit))
      • Unit - Add a 0.40 second Generic expiration timer to MirkwoodCurseDummy
      • Set VariableSet GroupMirkwoodCurse = (Units within 1000000000.00 of TempPoint matching ((((Owner of (Matching unit)) is an enemy of MirkwoodCursePlayer.) Equal to True) and ((((Matching unit) is A Hero) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit)
      • Unit Group - Pick every unit in GroupMirkwoodCurse and do (Actions)
        • Loop - Actions
          • Unit - Grant shared vision of (Picked unit) to MirkwoodCursePlayer
          • Unit - Order MirkwoodCurseDummy to Neutral Fire Lord - Soul Burn (Picked unit)
          • Unit - Deny shared vision of (Picked unit) to MirkwoodCursePlayer
      • Custom script: call RemoveLocation (udg_TempPoint)
      • Custom script: call DestroyGroup (udg_GroupMirkwoodCurse)
Also, I recommend basing your Dummy units off of the Locust rather than a Wisp.
I tried it but it still doesn't work 😟
 
Level 14
Joined
Jul 19, 2007
Messages
772
Can I see your trigger? Also, look into what doom_sheep said :)
  • Curse of Mirkwood
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Curse of Mirkwood
    • Actions
      • Set VariableSet TempPoint = (Position of (Triggering unit))
      • Set VariableSet MirkwoodCursePlayer = (Owner of (Triggering unit))
      • Unit - Create 1 Spell Cast Dummy (Curse of Mirkwood) for MirkwoodCursePlayer at TempPoint facing Default building facing degrees
      • Set VariableSet MirkwoodCurseDummy = (Last created unit)
      • Unit - Add Curse of Mirkwood (Dummy Spell) to MirkwoodCurseDummy
      • Unit - Set level of Curse of Mirkwood (Dummy Spell) for MirkwoodCurseDummy to (Level of Curse of Mirkwood for Keeper of the Grove 0003 <gen>)
      • Unit - Add a 0.40 second Generic expiration timer to MirkwoodCurseDummy
      • Set VariableSet GroupMirkwoodCurse = (Units within 1000000000.00 of (Position of (Triggering unit)) matching ((((Owner of (Matching unit)) is an enemy of MirkwoodCursePlayer.) Equal to True) and ((((Matching unit) is A Hero) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False)
      • Unit Group - Pick every unit in GroupMirkwoodCurse and do (Actions)
        • Loop - Actions
          • Unit - Grant shared vision of (Picked unit) to MirkwoodCursePlayer
          • Unit - Order (Last created unit) to Neutral Fire Lord - Soul Burn (Picked unit)
          • Unit - Deny shared vision of (Picked unit) to MirkwoodCursePlayer
      • Custom script: call RemoveLocation (udg_TempPoint)
      • Custom script: call DestroyGroup (udg_GroupMirkwoodCurse)
Yes I have abilities that's based on "Channel" but I don't think that could be the cause...
 

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,690
This line is wrong:
  • Set VariableSet GroupMirkwoodCurse = (Units within 1000000000.00 of (Position of (Triggering unit)) matching ((((Owner of (Matching unit)) is an enemy of MirkwoodCursePlayer.) Equal to True) and ((((Matching unit) is A Hero) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False)
It should be this:
  • Set VariableSet GroupMirkwoodCurse = (Units within 1000000000.00 of TempPoint matching ((((Owner of (Matching unit)) is an enemy of MirkwoodCursePlayer.) Equal to True) and ((((Matching unit) is A Hero) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit)
And better yet, just use "Units in playable map area matching..." rather than Units within range of a Point.


This line is wrong:
  • Unit - Order (Last created unit) to Neutral Fire Lord - Soul Burn (Picked unit)
It should be this:
  • Unit - Order MirkwoodCurseDummy to Neutral Fire Lord - Soul Burn (Picked unit)

Make sure you actually use the variables you set, otherwise they serve no purpose.

And to clarify, the trigger I posted earlier worked perfectly in my test map. So if the above fixes don't do the trick then it's something weird about your map like an issue with the Channel thing mentioned earlier or you have another trigger that is interfering.
 
Last edited:
Level 23
Joined
Oct 18, 2008
Messages
938
try adding this line after you create your dummy
1659360615723.png
 
Level 14
Joined
Jul 19, 2007
Messages
772
This line is wrong:
  • Set VariableSet GroupMirkwoodCurse = (Units within 1000000000.00 of (Position of (Triggering unit)) matching ((((Owner of (Matching unit)) is an enemy of MirkwoodCursePlayer.) Equal to True) and ((((Matching unit) is A Hero) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False)
It should be this:
  • Set VariableSet GroupMirkwoodCurse = (Units within 1000000000.00 of TempPoint matching ((((Owner of (Matching unit)) is an enemy of MirkwoodCursePlayer.) Equal to True) and ((((Matching unit) is A Hero) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit)
And better yet, just use "Units in playable map area matching..." rather than Units within range of a Point.


This line is wrong:
  • Unit - Order (Last created unit) to Neutral Fire Lord - Soul Burn (Picked unit)
It should be this:
  • Unit - Order MirkwoodCurseDummy to Neutral Fire Lord - Soul Burn (Picked unit)

Make sure you actually use the variables you set, otherwise they serve no purpose.

And to clarify, the trigger I posted earlier worked perfectly in my test map. So if the above fixes don't do the trick then it's something weird about your map like an issue with the Channel thing mentioned earlier or you have another trigger that is interfering.
Well I tried to do exactly like you said but it still doesn't work. Why not sending me your testing map then?
 
Level 14
Joined
Jul 19, 2007
Messages
772
The map is on another computer. My fixed trigger was working using your demo map so you can test it in there.

Also, can you show me your trigger again.
  • Curse of Mirkwood
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Curse of Mirkwood
    • Actions
      • Set VariableSet TempPoint = (Position of (Triggering unit))
      • Set VariableSet MirkwoodCursePlayer = (Owner of (Triggering unit))
      • Unit - Create 1 Spell Cast Dummy (Curse of Mirkwood) for MirkwoodCursePlayer at TempPoint facing Default building facing degrees
      • Set VariableSet MirkwoodCurseDummy = (Last created unit)
      • Unit - Add Curse of Mirkwood (Dummy Spell) to MirkwoodCurseDummy
      • Unit - Set level of Curse of Mirkwood (Dummy Spell) for MirkwoodCurseDummy to (Level of Curse of Mirkwood for Keeper of the Grove 0003 <gen>)
      • Unit - Add a 0.40 second Generic expiration timer to MirkwoodCurseDummy
      • Set VariableSet GroupMirkwoodCurse = (Units in (Playable map area))
      • Unit Group - Pick every unit in GroupMirkwoodCurse and do (Actions)
        • Loop - Actions
          • Unit - Grant shared vision of (Picked unit) to MirkwoodCursePlayer
          • Unit - Order MirkwoodCurseDummy to Neutral Fire Lord - Soul Burn (Picked unit)
          • Unit - Deny shared vision of (Picked unit) to MirkwoodCursePlayer
      • Custom script: call RemoveLocation (udg_TempPoint)
      • Custom script: call DestroyGroup (udg_GroupMirkwoodCurse)
 

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,690
That looks fine aside from your Unit Group not having any filters anymore.

Try the map I just attached.
  • Curse of Mirkwood
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Curse of Mirkwood
    • Actions
      • Set VariableSet TempPoint = (Position of (Triggering unit))
      • Set VariableSet MirkwoodCursePlayer = (Owner of (Triggering unit))
      • Unit - Create 1 Spell Cast Dummy (Curse of Mirkwood) for MirkwoodCursePlayer at TempPoint facing Default building facing degrees
      • Set VariableSet MirkwoodCurseDummy = (Last created unit)
      • Unit - Add Curse of Mirkwood (Dummy Spell) to MirkwoodCurseDummy
      • Unit - Set level of Curse of Mirkwood (Dummy Spell) for MirkwoodCurseDummy to (Level of Curse of Mirkwood for (Triggering unit))
      • Unit - Add a 0.40 second Generic expiration timer to MirkwoodCurseDummy
      • Set VariableSet GroupMirkwoodCurse = (Units in (Playable map area))
      • Unit Group - Pick every unit in GroupMirkwoodCurse and do (Actions)
        • Loop - Actions
          • Set VariableSet MirkwoodCurseTarget = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (MirkwoodCurseTarget belongs to an enemy of MirkwoodCursePlayer.) Equal to True
              • (MirkwoodCurseTarget is A Hero) Equal to True
              • (MirkwoodCurseTarget is alive) Equal to True
            • Then - Actions
              • Unit - Grant shared vision of MirkwoodCurseTarget to MirkwoodCursePlayer
              • Unit - Order MirkwoodCurseDummy to Neutral Fire Lord - Soul Burn MirkwoodCurseTarget
              • Unit - Deny shared vision of MirkwoodCurseTarget to MirkwoodCursePlayer
            • Else - Actions
      • Custom script: call RemoveLocation (udg_TempPoint)
      • Custom script: call DestroyGroup (udg_GroupMirkwoodCurse)
Also, make sure you Shift-click the Cast Range field and set it to 999999.
 

Attachments

  • fixed com.w3m
    19.1 KB · Views: 5
  • cast range.png
    cast range.png
    114.1 KB · Views: 6
Level 14
Joined
Jul 19, 2007
Messages
772
That looks fine aside from your Unit Group not having any filters anymore.

Try the map I just attached.
  • Curse of Mirkwood
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Curse of Mirkwood
    • Actions
      • Set VariableSet TempPoint = (Position of (Triggering unit))
      • Set VariableSet MirkwoodCursePlayer = (Owner of (Triggering unit))
      • Unit - Create 1 Spell Cast Dummy (Curse of Mirkwood) for MirkwoodCursePlayer at TempPoint facing Default building facing degrees
      • Set VariableSet MirkwoodCurseDummy = (Last created unit)
      • Unit - Add Curse of Mirkwood (Dummy Spell) to MirkwoodCurseDummy
      • Unit - Set level of Curse of Mirkwood (Dummy Spell) for MirkwoodCurseDummy to (Level of Curse of Mirkwood for (Triggering unit))
      • Unit - Add a 0.40 second Generic expiration timer to MirkwoodCurseDummy
      • Set VariableSet GroupMirkwoodCurse = (Units in (Playable map area))
      • Unit Group - Pick every unit in GroupMirkwoodCurse and do (Actions)
        • Loop - Actions
          • Set VariableSet MirkwoodCurseTarget = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (MirkwoodCurseTarget belongs to an enemy of MirkwoodCursePlayer.) Equal to True
              • (MirkwoodCurseTarget is A Hero) Equal to True
              • (MirkwoodCurseTarget is alive) Equal to True
            • Then - Actions
              • Unit - Grant shared vision of MirkwoodCurseTarget to MirkwoodCursePlayer
              • Unit - Order MirkwoodCurseDummy to Neutral Fire Lord - Soul Burn MirkwoodCurseTarget
              • Unit - Deny shared vision of MirkwoodCurseTarget to MirkwoodCursePlayer
            • Else - Actions
      • Custom script: call RemoveLocation (udg_TempPoint)
      • Custom script: call DestroyGroup (udg_GroupMirkwoodCurse)
Also, make sure you Shift-click the Cast Range field and set it to 999999.
Ah finally it seems to work like I want it but there is another problem. If the unit dies of the damage from the curse, the killing credit won't go to the caster, it goes to no one...
 

Attachments

  • killcredit.png
    killcredit.png
    584.5 KB · Views: 10

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,690
Ah finally it seems to work like I want it but there is another problem. If the unit dies of the damage from the curse, the killing credit won't go to the caster, it goes to no one...
That's because expired units are removed from the game. You can fix this by increasing the Expiration Timer so it lasts longer than the Spell's duration.
 
Status
Not open for further replies.
Top