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

[Trigger] CTF Trigger Gives Error (Not Working Properly)

Status
Not open for further replies.
Level 2
Joined
Jan 27, 2013
Messages
15
I don't know what is the cause of this, but I get an error that closes me out of warcraft when I click the button for capture the flag.

Because of this error, I don't know if my trigger even works besides the 'error' part of it. Any Help would be greatly appreciated!!!

  • Capture the Flag
    • Events
      • Dialog - A dialog button is clicked for Dialog[1]
    • Conditions
      • (Clicked dialog button) Equal to DialogButtons[3]
    • Actions
      • Trigger - Turn on Team 1 Capture <gen>
      • Trigger - Turn on Team 2 Capture <gen>
      • Trigger - Run CTF Main <gen> (ignoring conditions)
  • CTF Main
    • Events
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (PlayerColors[(Player number of Player 1 (Red))] + ((Name of Player 1 (Red)) + |r has selected Capture the Flag! ))
      • Unit - Unhide Red (large) 0007 <gen>
      • Item - Show Team 1 Flag 0010 <gen>
      • Unit - Unhide Blue (large) 0008 <gen>
      • Item - Show Team 2 Flag 0009 <gen>
      • Player Group - Remove all players from Team1
      • Player Group - Remove all players from Team2
      • Player Group - Add Player 1 (Red) to Team1
      • Player Group - Add Player 2 (Blue) to Team1
      • Player Group - Add Player 3 (Teal) to Team1
      • Player Group - Add Player 4 (Purple) to Team1
      • Player Group - Add Player 5 (Yellow) to Team2
      • Player Group - Add Player 6 (Orange) to Team2
      • Player Group - Add Player 7 (Green) to Team2
      • Player Group - Add Player 8 (Pink) to Team2
      • Player Group - Make Team1 treat Team2 as an Enemy
      • Player Group - Make Team2 treat Team1 as an Enemy
      • Player Group - Make Team2 treat Team2 as an Ally with shared vision
      • Player Group - Make Team2 treat Team2 as an Ally with shared vision
      • Player Group - Pick every player in Team1 and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) controller) Equal to User
              • ((Picked player) slot status) Equal to Is playing
            • Then - Actions
              • Unit - Create 1 Dark Archer for (Picked player) at (Random point in team1 <gen>) facing Default building facing degrees
              • Camera - Pan camera for (Picked player) to (Center of team1 <gen>) over 1.00 seconds
              • Player - Change color of (Picked player) to Red, Changing color of existing units
            • Else - Actions
      • Player Group - Pick every player in Team2 and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) controller) Equal to User
              • ((Picked player) slot status) Equal to Is playing
            • Then - Actions
              • Unit - Create 1 Dark Archer for (Picked player) at (Random point in team2 <gen>) facing Default building facing degrees
              • Camera - Pan camera for (Picked player) to (Center of team2 <gen>) over 1.00 seconds
              • Player - Change color of (Picked player) to Blue, Changing color of existing units
            • Else - Actions
 
Last edited:
Level 15
Joined
Nov 30, 2007
Messages
1,202
try running it without the dialog button event to see if it is that or the CTF trigger.

Try disabling for instance the player group for loop actions so you can localize where it is not working.

You might also consider putting all or mot dialog button events in one trigger.
 
Level 2
Joined
Jan 27, 2013
Messages
15
try running it without the dialog button event to see if it is that or the CTF trigger.

Try disabling for instance the player group for loop actions so you can localize where it is not working.

You might also consider putting all or mot dialog button events in one trigger.

Ran without dialog button event. Didn't work. I ran the trigger without the loops, and it worked.

The issue is in the player group looping. Is there any other way I could do this?
 
Level 15
Joined
Nov 30, 2007
Messages
1,202
Ran without dialog button event. Didn't work. I ran the trigger without the loops, and it worked.

The issue is in the player group looping. Is there any other way I could do this?

Then the next step is to determine which of the three actions you have is not working, disable 2 of them at a time or as Apocalyse said, add waits and mesages.
 
Level 2
Joined
Jan 27, 2013
Messages
15
Then the next step is to determine which of the three actions you have is not working, disable 2 of them at a time or as Apocalyse said, add waits and mesages.

It's the unit creation I just figured out. I don't know how else I'm going to create the archer without using a loop like that. ;/ Any ideas?
 
Level 2
Joined
Jan 27, 2013
Messages
15
That might mean there's something wrong with the unit, because the unit creation trigger seems fine in itself.
I mean, sure, it has a location leak, but that's not very significant in the grand scheme of things.
Try creating another unit (say, a footman) and see if that works.

Tried the footman and it works. Also, tried switching the dark archer's model to a normal unit, because I was using a custom model. Clearly, the custom model is causing some issues. I better get a different one! Thanks for walking me through this!
 
Status
Not open for further replies.
Top