• 🏆 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!
  • ✅ HD Level Design Contest #1 POLL is now OPEN! Check out the stunning visuals of the final entries. 🔗Click here to cast your vote!

[Trigger] Can someone make me leakless freezing aura?

Status
Not open for further replies.
Level 6
Joined
Jun 23, 2005
Messages
195
It needs to be mui. I tried making myself but its freaking too hard.

so the spell:
every 3seconds it should stun random enemy for 1second that is affected by the freezing aura.

This is what kinda worked for a while:

  • Time - Every 3.00 seconds of game time
  • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Freezing Field)) and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • Unit Group - Pick every unit in (Random 1 units from (Units within 500.00 of (Position of (Picked unit)))) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) has buff freez ) Equal to True
                • Then - Actions
                  • Set FreezingFieldFreeze = (Picked unit)
                • Else - Actions
                  • Skip remaining actions
                  • Unit - Order (Picked unit) to Night Elf Keeper Of The Grove - Entangling Roots FreezingFieldFreeze
        • Else - Actions
          • Do nothing
 
Last edited by a moderator:
Level 29
Joined
Jul 29, 2007
Messages
5,174
Im quite sure something like this would work

  • Untitled Trigger 001
    • Events
      • Time - Every 3.00 seconds of game time
    • Conditions
    • Actions
      • Set unitGroup = (Units in (Playable map area) matching ((Level of Acid Bomb for (Matching unit)) Greater than 0))
      • For each (Integer A) from 1 to (Number of units in unitGroup), do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Random 1 units from unitGroup) and do (Actions)
            • Loop - Actions
              • Unit Group - Remove (Picked unit) from unitGroup
              • Set Point = (Position of (Picked unit))
              • Unit - Create 1 Footman for (Owner of (Picked unit)) at Point facing Default building facing degrees
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • Unit - Order (Last created unit) to Night Elf Tree Of Life - Entangle (Random unit from (Units within 512.00 of Point matching (((Matching unit) has buff Acid Bomb) Equal to True)))
              • Custom script: call RemoveLocation(udg_Point)
      • Custom script: call DestroyGroup(udg_unitGroup)
      • Unit Group - Remove all units from unitGroup

And please copy your WHOLE trigger as text (right click the white page, not every line).
 
Level 6
Joined
Jun 23, 2005
Messages
195
Im quite sure something like this would work

  • Untitled Trigger 001
    • Events
      • Time - Every 3.00 seconds of game time
    • Conditions
    • Actions
      • Set unitGroup = (Units in (Playable map area) matching ((Level of Acid Bomb for (Matching unit)) Greater than 0))
      • For each (Integer A) from 1 to (Number of units in unitGroup), do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Random 1 units from unitGroup) and do (Actions)
            • Loop - Actions
              • Unit Group - Remove (Picked unit) from unitGroup
              • Set Point = (Position of (Picked unit))
              • Unit - Create 1 Footman for (Owner of (Picked unit)) at Point facing Default building facing degrees
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • Unit - Order (Last created unit) to Night Elf Tree Of Life - Entangle (Random unit from (Units within 512.00 of Point matching (((Matching unit) has buff Acid Bomb) Equal to True)))
              • Custom script: call RemoveLocation(udg_Point)
      • Custom script: call DestroyGroup(udg_unitGroup)
      • Unit Group - Remove all units from unitGroup

And please copy your WHOLE trigger as text (right click the white page, not every line).

Yeah. that seems promising will test it out. THX!
 
Level 6
Joined
Jun 23, 2005
Messages
195
Unit - Order (Last created unit) to Night Elf Tree Of Life - Entangle (Random unit from (Units within 512.00 of Point matching (((Matching unit) has buff Acid Bomb) Equal to True)))

how you do this? i only the menu which offers event response things, matching unit, picked unit and those....
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Here I made it in pictures :nw:

Every step is the red value of the previous step.
 

Attachments

  • 1.JPG
    1.JPG
    24.1 KB · Views: 109
  • 2.JPG
    2.JPG
    24.6 KB · Views: 110
  • 3.JPG
    3.JPG
    23.5 KB · Views: 163
  • 4.JPG
    4.JPG
    23.6 KB · Views: 107
  • 5.JPG
    5.JPG
    22.9 KB · Views: 111
Level 6
Joined
Jun 23, 2005
Messages
195
  • Time - Every 3.00 seconds of game time
  • Custom script: set bj_wantDestroyGroup = true
  • Set FF_group = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Freezing Field Dummy))
  • Unit Group - Pick every unit in FF_group and do (Actions)
    • Loop - Actions
      • Unit - Order (Picked unit) to Night Elf Keeper Of The Grove - Entangling Roots (Random unit from (Units within 500.00 of (Position of (Last created unit)) matching (((Matching unit) has buff Freezing Aura ) Equal to True)))
  • Custom script: call DestroyGroup(udg_FF_group)
thanks to you i was able to make this! this is the final version of it and it works perfectly. +rep
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
This leaks {as much units are in the group} locations. If you have for example 5 dummies, it will leak 5 locations.
Thats why you need to pick 1 unit each time and set a point to its position and remove that point.

If you see me do something weird like that, most likely its not because I wanted to make it harder for you to understand :xxd:
 
Level 6
Joined
Jun 23, 2005
Messages
195
ahh yea thats true...ill try fixing it but i think it still can be done simplier than your trigger.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
It can't (atleast not in any way I can think about) because you must assign each unit a unique point variable.

Belive me, this is the way we do it in JASS and if there would be a better way it would have been done that way ^^ (no JASSers, don't talk about FirstOfGroup here...).
 
Level 6
Joined
Jun 23, 2005
Messages
195
It can't (atleast not in any way I can think about) because you must assign each unit a unique point variable.

Belive me, this is the way we do it in JASS and if there would be a better way it would have been done that way ^^ (no JASSers, don't talk about FirstOfGroup here...).

yeah..ill go your way. it really is best when i think about it :). Its long time since iv done triggering so cant remeber all these things.

*Edit* i make this and i really dont know why it aint working. Freezing field dummy has the ability..

  • Time - Every 3.00 seconds of game time
  • Custom script: set bj_wantDestroyGroup = true
  • Set FF_group = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Freezing Field Dummy))
  • For each (Integer A) from 1 to (Number of units in FF_group), do (Actions)
    • Loop - Actions
      • Unit Group - Pick every unit in (Random 1 units from FF_group) and do (Actions)
        • Loop - Actions
          • Unit Group - Remove (Picked unit) from FF_group
          • Set FF_point = (Position of (Picked unit))
          • Unit - Order (Picked unit) to Night Elf Keeper Of The Grove - Entangling Roots (Random unit from (Units within 500.00 of FF_point matching (((Matching unit) has buff Freezing Aura ) Equal to True)))
          • Custom script: call RemoveLocation(udg_FF_point)
  • Custom script: call DestroyGroup(udg_FF_group)
 
Last edited:
Status
Not open for further replies.
Top