• 🏆 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!

[Trigger] Repick Trigger

Status
Not open for further replies.
Level 4
Joined
Sep 25, 2009
Messages
49
Well i did * SOMETHING* to my repick trigger almost 2 months ago and i just started working on the map again, when i went to test the map everything worked fine but the -repick trigger.

I was messing with it to make it so when heroes are being revive somone couldn't do -repick and get 2 heroes once the other revived lol But anyways here it is =\

  • Repick
    • Events
      • Player - Player 1 (Red) types a chat message containing -repick as An exact match
      • Player - Player 2 (Blue) types a chat message containing -repick as An exact match
      • Player - Player 3 (Teal) types a chat message containing -repick as An exact match
      • Player - Player 4 (Purple) types a chat message containing -repick as An exact match
    • Conditions
      • (Number of units in (Units in (Playable map area) owned by (Triggering player))) Greater than or equal to 1
      • ((Triggering unit) is alive) Equal to True
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) owned by (Triggering player)) and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
          • Player - Set (Triggering player) Current gold to 0
          • Player - Set (Triggering player) Current lumber to 0
      • Unit - Create 1 Wisp for (Triggering player) at (Center of hero chooser spawn <gen>) facing Default building facing degrees
      • Camera - Pan camera for (Triggering player) to (Center of hero chooser spawn <gen>) over 0.00 seconds
 
Level 7
Joined
Apr 12, 2009
Messages
188
Pretty sure that:
  • ((Triggering unit) is alive) Equal to True
... this condition is always returning false because there is no triggering unit (only a triggering player). Hense the actions are never taken.

If you want to check and see if the 'triggering unit' is alive, put a condition in the unit-group action loop for the 'picked unit' (is alive equal to true...).

Also, not that people will be spamming repick all day but you do leak the unit group Units in (Playable map area). :ugly:

[EDIT] oh yeah and the point 'Center of hero chooser spawn <gen>' is leaking in two places heh
 
Status
Not open for further replies.
Top