• 🏆 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 10
Joined
Nov 3, 2009
Messages
686
Hey, Since my triggering skills are weak, I'm trying to make repick system/trigger that it would be possible to repick once per game for each player? But something wrong is here, text doesn't appear? Any suggestions how to fix?

Variables I'm using is:

Boolean - Array - Size (1)
Unit Group


  • Repick Sky
    • Events
      • Player - Player 1 (Red) types a chat message containing -repick as An exact match
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Repick[(Player number of (Triggering player))] Equal to False
        • Then - Actions
          • Set Repick[(Player number of (Triggering player))] = True
          • Set repickgroup = (Units owned by (Player((Player number of (Triggering player)))) matching (((Matching unit) is A Hero) Equal to True))
          • Unit Group - Pick every unit in repickgroup and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
              • Unit - Create 1 Circle of Power for Player 1 (Red) at (Center of repicksky <gen>) facing Default building facing degrees
              • Camera - Pan camera for (Owner of (Triggering unit)) to (Center of repicksky <gen>) over 0.00 seconds
          • Custom script: call DestroyGroup(udg_repickgroup)
        • Else - Actions
          • Game - Display to (Player group((Owner of (Triggering unit)))) the text: You can only repick...
 
Level 12
Joined
Oct 16, 2010
Messages
680
There is no Triggering Unit , because this is a chat event.
change
this
  • Set repickgroup = (Units owned by (Player((Player number of (Triggering player)))) matching (((Matching unit) is A Hero) Equal to True))
to
  • Set repickgroup = (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))
this
  • Unit - Create 1 Circle of Power for Player 1 (Red) at (Center of repicksky <gen>) facing Default building facing degrees
to
  • Set Temp_Unit = Create 1 Circle of Power for (Triggering player) at (Center of repicksky <gen>) facing Default building facing degrees
this
  • Camera - Pan camera for (Owner of (Triggering unit)) to (Center of repicksky <gen>) over 0.00 seconds
to
  • Camera - Pan camera for (Triggering player) to (Center of repicksky <gen>) over 0.00 seconds
this
  • Game - Display to (Player group((Owner of (Triggering unit)))) the text: You can only repick...
to
  • Game - Display to (Player group((Triggering player))) the text: You can only repick...
 
Status
Not open for further replies.
Top