• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Dummy Ability Problem

Status
Not open for further replies.
Level 3
Joined
Jun 15, 2008
Messages
23
Anyone want to help me with dummy spells? I want to make soul burn (Drown) become an aoe ability, so i make a dummy trigger for it, but the end result i only get the main target with soul burn, and just another random one nearby, not the whole group

  • Drown
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Drown (Titan)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Drown (Titan) for (Casting unit)) Equal to 1
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 300.00 of (Position of (Target unit of ability being cast)) matching (((Matching unit) Not equal to (Target unit of ability being cast)) and ((((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True) and ((((Matching uni and do (Actions)
            • Loop - Actions
              • Unit - Create 1 Object for (Owner of (Casting unit)) at (Position of (Picked unit)) facing (Position of (Picked unit))
              • Unit Group - Add (Last created unit) to ObjectGroupDrown
              • Unit - Add Drown (Object) to (Last created unit)
              • Unit - Order (Last created unit) to Neutral Fire Lord - Soul Burn (Picked unit)
        • Else - Actions

I had the same problem for hurl boulder too
 
Last edited by a moderator:
Level 3
Joined
Jun 15, 2008
Messages
23
Set TargetGroupDrown = (Units within 300.00 of (Position of (Target unit of ability being cast)) matching ((((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True) and (((Matching unit) Not equal to (Target unit of ability being cast)) and (((Matching unit) is alive) Equal to True)

i checked the condition, it works, just the leaking

EDIT:
thanks for showing me though that there are such things as leaks, i didnt know that would leak so easily first time i was introduced to that. Too bad i dont know how to fix it

Do NOT double-post. Use the Edit Post button.
~Posts Merged
 
Last edited by a moderator:
Level 28
Joined
Mar 25, 2008
Messages
2,955
Well i can fix it for you.. just watch ^^
  • Drown
  • Events
  • Unit - A unit Begins casting an ability
  • Conditions
  • (Ability being cast) Equal to Drown (Titan)
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Level of Drown (Titan) for (Casting unit)) Equal to 1
      • Then - Actions
        • Set temppoint = (Postion of (target unit of ability being cast))
        • Custom script: set bj_wantDestroyGroup = true
        • Set TargetGroupDrown = (Units within 300.00 of temppoint matching ((((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True) and (((Matching unit) Not equal to (Target unit of ability being cast)) and (((Matching unit) is alive) Equal to True)
      • Unit Group - Pick every unit in TargetGroupDrown and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Object for (Owner of (Casting unit)) at temppoint1 facing (Picked Unit)
          • Unit Group - Add (Last created unit) to ObjectGroupDrown
          • Unit - Add a x second standard expiration timer to (Last created unit)
          • Unit - Add Drown (Object) to (Last created unit)
          • Unit - Order (Last created unit) to Neutral Fire Lord - Soul Burn (Picked unit)
      • Else - Actions
    • Custom script - call RemoveLocation(udg_temppoint)
    • Custom script - call DestroyGroup(udg_tempgroup)
You just have to fill in the x with the value you want the dummy to be 'alive'

/shall be ok now..
 
Last edited:
Level 19
Joined
Aug 24, 2007
Messages
2,888
1- LEARN ABOUT THE F**CING bj_wantDestroyGroup
2- You destroy group inside loop which will cause thread crash in second time run

And you check your conditions, soul burn mana cost and things like that
"Matching unit is not equal to target unit of ability being cast" ? whats that
 
Level 11
Joined
Oct 20, 2007
Messages
342
HHOOUUNN u wan only 1 unit in unit group?
  • Set UnitGroup = (Random 1 units from (Units within 512.00 of (Position of (Last created unit))))
Unit group > Random N unit from unit group function.
 
Level 3
Joined
Jun 25, 2008
Messages
65
Hmm... I could give you my Spell. I got some of them. They only use another Spell which is casted on an enemy.
Problem is that the Units, that cast the spell are not removed, so I hide them.
But they work. I tested it a hundred times^^
 
Level 3
Joined
Jun 15, 2008
Messages
23
Drown
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Drown (Titan)
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Drown (Titan) for (Casting unit)) Equal to 1
Then - Actions
Set RandomPoint = (Position of (Target unit of ability being cast))
Custom script: set bj_wantDestroyGroup = true
Set TargetGroupDrown = (Units within 300.00 of RandomPoint matching ((((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True) and (((Matching unit) Not equal to (Target unit of ability being cast)) and (((Matching unit) is alive) Equal to True))))
Unit Group - Pick every unit in TargetGroupDrown and do (Actions)
Loop - Actions
Unit - Create 1 Object for (Owner of (Casting unit)) at RandomPoint facing (Position of (Picked unit))
Unit - Add a 1.50 second Summoned Unit expiration timer to (Last created unit)
Unit Group - Add (Last created unit) to ObjectGroupDrown
Unit - Add Drown (Object) to (Last created unit)
Unit - Order (Last created unit) to Neutral Fire Lord - Soul Burn (Picked unit)
Else - Actions
Custom script: call RemoveLocation(udg_RandomPoint)
Custom script: call DestroyGroup(udg_TargetGroupDrown)

is this seem right to you guys? two targets become soul burned
 
Status
Not open for further replies.
Top