• 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.

[Trigger] Problem

Status
Not open for further replies.
Level 13
Joined
Sep 24, 2007
Messages
1,023
Well ive recently put this trigger into a map
  • Untitled Trigger 001
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Time Stop
    • Actions
      • Set point = (Target point of ability being cast)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 512.00 of point) and do (Actions)
        • Loop - Actions
          • Unit - Pause (Picked unit)
          • Animation - Change (Picked unit)'s animation speed to 0.00% of its original speed
          • Wait 20.00 seconds
          • Animation - Change (Picked unit)'s animation speed to 100.00% of its original speed
          • Unit - Unpause (Picked unit)
      • Custom script: call RemoveLocation(udg_Point)
and now when i try and test it it simply just open up wc3 to the begainging screen and when i go into custom games to host / play it it says can not locate map
 
Level 8
Joined
Aug 4, 2006
Messages
357
one other thing i just noticed; you can't use waits inside loops (like pick every unit in unit group). i don't think this should keep your map from being opened, but blizzard warns against this: "Wait actions should not be used within." so instead, you should do
  • Untitled Trigger 001
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Time Stop
    • Actions
      • Set point = (Target point of ability being cast)
      • Set group = (Units within 512.00 of point)
      • Unit Group - Pick every unit in group and do (Actions)
        • Loop - Actions
          • Unit - Pause (Picked unit)
          • Animation - Change (Picked unit)'s animation speed to 0.00% of its original speed
      • Wait 20.00 seconds
      • Unit Group - Pick every unit in group and do (Actions)
        • Loop - Actions
          • Animation - Change (Picked unit)'s animation speed to 100.00% of its original speed
          • Unit - Unpause (Picked unit)
      • Custom script: call RemoveLocation(udg_point)
      • Custom script: call DestroyGroup(udg_group)
 
Level 8
Joined
Aug 4, 2006
Messages
357
i'm not a plumber, so i'm not a master at plugging leaks. but i made it like this so the same units will be affected in both loops. the way you suggested would allow more units to come in range within that 20 seconds, which would screw things up if you wanted to add in an action besides "unpause" or "set animation speed to 100%"

Edit: it'd be best to use a local variable for the group, but he's using GUI so... idk
 
Status
Not open for further replies.
Top