• 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] One part of my Capture the Flag system is not functioning at all

Status
Not open for further replies.
Level 14
Joined
Mar 27, 2008
Messages
1,003
Well, on the third wave of my upcoming map, the object of the wave is for one of the units to score three points. Whichever player scores three points first wins the wave and gets some extra gold. Everything about the wave (such as the leaderboard, flag spawn and wave spawn) works just fine. However, when I carry the flag to the spot where you're supposed to be able to score a point... nothing happens. The flag doesn't leave the inventory back to the map, and no points are scored. Absolutely nothing happens. Here are the triggers for the wave.

(The Initialization Trigger, Irrelevant to the Problem)

  • Wave 3 Initialization
    • Events
    • Conditions
    • Actions
      • Sound - Play QuestNew <gen>
      • Sound - Play DarkAgents <gen>
      • Game - Display to (All players) the text: |cffff0000You have ...
      • Wait 25.00 seconds
      • Game - Display to (All players) the text: |cffff00005|r
      • Wait 1.00 seconds
      • Game - Display to (All players) the text: |cffff00004|r
      • Wait 1.00 seconds
      • Game - Display to (All players) the text: |cffff00003|r
      • Wait 1.00 seconds
      • Game - Display to (All players) the text: |cffff00002|r
      • Wait 1.00 seconds
      • Game - Display to (All players) the text: |cffff00001|r
      • Wait 1.00 seconds
      • Trigger - Run Wave 3 Run <gen> (checking conditions)
(The Wave Itself, this sets up the leaderboard, turns on the other Wave Triggers and spawns the monsters. Everything works fine here, Leaderboard pops up, the other triggers turn on just fine.)

  • Wave 3 Run
    • Events
    • Conditions
    • Actions
      • Game - Display to (All players) the text: |c007d7d7dWave Thre...
      • Sound - Stop DarkAgents <gen> After fading
      • Sound - Play QuestNew <gen>
      • Wait 5.00 seconds
      • Sound - Play ArthasTheme <gen>
      • Leaderboard - Create a leaderboard for (All players) titled |cffff0000Capture t...
      • Leaderboard - Add Player 1 (Red) to (Last created leaderboard) with label Crimson Flame and value 0
      • Leaderboard - Add Player 2 (Blue) to (Last created leaderboard) with label Deep Wave and value 0
      • Leaderboard - Add Player 3 (Teal) to (Last created leaderboard) with label Frozen Spear and value 0
      • Leaderboard - Add Player 4 (Purple) to (Last created leaderboard) with label Deathly Silence and value 0
      • Leaderboard - Add Player 5 (Yellow) to (Last created leaderboard) with label Sunlight Beam and value 0
      • Set WaveThree_RedPoints = 0
      • Set WaveThree_BluePoints = 0
      • Set WaveThree_TealPoints = 0
      • Set WaveThree_PurplePoints = 0
      • Set WaveThree_YellowPoints = 0
      • Trigger - Turn on Wave 3 Red Point Scores <gen>
      • If ((Player 1 (Red) slot status) Equal to Is unused) then do (Leaderboard - Remove Player 1 (Red) from WaveThree_Leaderboard) else do (Trigger - Turn off Wave 3 Red Point Scores <gen>)
      • Trigger - Turn on Wave 3 Blue Point Scores <gen>
      • If ((Player 2 (Blue) slot status) Equal to Is unused) then do (Leaderboard - Remove Player 2 (Blue) from WaveThree_Leaderboard) else do (Trigger - Turn off Wave 3 Blue Point Scores <gen>)
      • Trigger - Turn on Wave 3 Teal Point Scores <gen>
      • If ((Player 3 (Teal) slot status) Equal to Is unused) then do (Leaderboard - Remove Player 3 (Teal) from WaveThree_Leaderboard) else do (Trigger - Turn off Wave 3 Teal Point Scores <gen>)
      • Trigger - Turn on Wave 3 Purple Point Scores <gen>
      • If ((Player 4 (Purple) slot status) Equal to Is unused) then do (Leaderboard - Remove Player 4 (Purple) from WaveThree_Leaderboard) else do (Trigger - Turn off Wave 3 Purple Point Scores <gen>)
      • Trigger - Turn on Wave 3 Yellow Point Scores <gen>
      • If ((Player 5 (Yellow) slot status) Equal to Is unused) then do (Leaderboard - Remove Player 5 (Yellow) from WaveThree_Leaderboard) else do (Trigger - Turn off Wave 3 Yellow Point Scores <gen>)
      • Leaderboard - Show (Last created leaderboard)
      • Wait 0.50 seconds
      • Game - Display to (All players) the text: |cffff0000Wave Obje...
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to WaveThreeGroup
      • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 seconds
      • Item - Move The Flag 0009 <gen> to (Random point in SPAWN Random Item Locations <gen>)
      • Trigger - Turn on Wave 3 AI <gen>
      • Trigger - Turn on Wave 3 Flag Pick Up <gen>
  • Wave 3 AI
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in WaveThreeGroup and do (Unit - Order (Picked unit) to Attack-Move To (Random point in (Playable map area)))
(When a unit picks up the flag it displays the text just fine, nothing wrong here)

  • Wave 3 Flag Pick Up
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item being manipulated) Equal to The Flag 0009 <gen>
    • Actions
      • Game - Display to (All players) the text: |c007d7d7dThe flag ...
(The point score, this is the trigger that doesn't work. Basically, what's supposed to happen is that the unit (not a hero) is supposed to run into the region holding the item, then a point gets added to that player on the leaderboard) (there are five triggers like this, one for each player since there are five players)

  • Wave 3 Red Point Scores
    • Events
      • Unit - A unit enters CTF Food Market Point <gen>
    • Conditions
      • (Owner of (Entering unit)) Equal to Player 1 (Red)
      • The Flag 0009 <gen> Equal to (Item carried by The Crimson Flame 0008 <gen> in slot 1)
    • Actions
      • Item - Move The Flag 0009 <gen> to (Random point in SPAWN Random Item Locations <gen>)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WaveThree_RedPoints Equal to 0
        • Then - Actions
          • Set WaveThree_RedPoints = 1
          • Wait 0.10 seconds
          • Leaderboard - Change the value for Player 1 (Red) in WaveThree_Leaderboard to WaveThree_RedPoints
        • Else - Actions
          • Game - Display to (All players) the text: |c007d7d7dThe Crims...
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WaveThree_RedPoints Equal to 1
        • Then - Actions
          • Set WaveThree_RedPoints = 2
          • Wait 0.10 seconds
          • Leaderboard - Change the value for Player 1 (Red) in WaveThree_Leaderboard to WaveThree_RedPoints
        • Else - Actions
          • Game - Display to (All players) the text: |c007d7d7dThe Crims...
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WaveThree_RedPoints Equal to 2
        • Then - Actions
          • Set WaveThree_RedPoints = 3
          • Wait 0.10 seconds
          • Leaderboard - Change the value for Player 1 (Red) in WaveThree_Leaderboard to WaveThree_RedPoints
        • Else - Actions
          • Game - Display to (All players) the text: |c007d7d7dThe Crims...
          • Player - Add 100 to Player 1 (Red) Current gold
          • Trigger - Run Wave 3 End <gen> (checking conditions)
(Ends the wave and cleans up)

  • Wave 3 End
    • Events
    • Conditions
    • Actions
      • Unit Group - Pick every unit in WaveThreeGroup and do (Unit - Explode (Picked unit))
      • Item - Move The Flag 0009 <gen> to (Center of CTF Flag Return Point <gen>)
      • Leaderboard - Destroy WaveThree_Leaderboard
      • Sound - Stop ArthasTheme <gen> After fading
      • Trigger - Turn off Wave 3 AI <gen>
      • Trigger - Turn off Wave 3 Flag Pick Up <gen>
      • Trigger - Turn off Wave 3 Initialization <gen>
      • Trigger - Turn off Wave 3 Red Point Scores <gen>
      • Trigger - Turn off Wave 3 Blue Point Scores <gen>
      • Trigger - Turn off Wave 3 Teal Point Scores <gen>
      • Trigger - Turn off Wave 3 Purple Point Scores <gen>
      • Trigger - Turn off Wave 3 Yellow Point Scores <gen>
      • Trigger - Turn off Wave 3 Run <gen>
      • Trigger - Run Ninja AI Heal <gen> (checking conditions)
      • Trigger - Run Villager Respawn <gen> (checking conditions)
      • Trigger - Run Wave 4 Initialization <gen> (checking conditions)
      • Wait 0.10 seconds
      • Unit Group - Pick every unit in WaveThreeGroup and do (Unit - Remove (Picked unit) from the game)
So... any ideas as to why the points aren't scoring?
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
I don't know where the problem is, but a bit of advice:
In the Wave3 Run trigger, you can shorten it and simplify it by learning how to use Loops - you can loop through the player slot status check as well as through spawning units.

Also, you terribly leak locations when spawning new units. You should take a look at http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/ to learn how to remove leaks.

Edit: Also is this correct? I'm not really following what should the trigger "Wave 3 REd point score" do, but this:
  • If ((Player 1 (Red) slot status) Equal to Is unused) then do (Leaderboard - Remove Player 1 (Red) from WaveThree_Leaderboard) else do (Trigger - Turn off Wave 3 Red Point Scores <gen>)
means that if the player 1 = no player, then you remove him from Leaderboard, however if someone plays as player 1 (Red), then you turn off "Wave 3 Red Point Scores"
 
Level 14
Joined
Mar 27, 2008
Messages
1,003
I don't know where the problem is, but a bit of advice:
In the Wave3 Run trigger, you can shorten it and simplify it by learning how to use Loops - you can loop through the player slot status check as well as through spawning units.

Also, you terribly leak locations when spawning new units. You should take a look at http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/ to learn how to remove leaks.

Edit: Also is this correct? I'm not really following what should the trigger "Wave 3 REd point score" do, but this:
  • If ((Player 1 (Red) slot status) Equal to Is unused) then do (Leaderboard - Remove Player 1 (Red) from WaveThree_Leaderboard) else do (Trigger - Turn off Wave 3 Red Point Scores <gen>)
means that if the player 1 = no player, then you remove him from Leaderboard, however if someone plays as player 1 (Red), then you turn off "Wave 3 Red Point Scores"

Thanks for the link on leaks. I'll take a look at that to help make my wave more efficient. Any idea on where I can learn loops?

While waiting for someone to help me fix the CTF problem I might as well fix up the Wave 3 trigger.

Edit: That part means that if Red's slot is unused, then it'll turn off Red Point Score, but if Red's there, the trigger will turn on. (The trigger is initially off)
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
Check the trigger again, what you posted switches off that other trigger if player 1 slot is used.


-------------
As for loops, this is loop:

This is how loop looks like in GUI:
  • For each (Integer YourLoopVar) from X to Y, do (Actions)
    • Loop - Actions
      • -------- Your actions here --------
It can be found in the action menu under "- General" tab as "For Each integer variable do multple actions".
First you need to create one generic integer variable you will use for all[1] your loops. In the trigger above I named this integer variable as "YourLoopVar".
In the action menu you can see there are also "For Each Integer A/Integer B variable do multiple actions" - don't use these, the're not as efficient.

Now you need to set X and Y to starting loop (X) and ending loop (Y). It is best to set X as 1, as it is the easiest to manipulate and for example count number of loops. Ending loop means which loop is the ending one.

So for example if you set Loop from 1 (= X) to 10 (= Y), then it will loop 10 times (1, 2, ... 10).
If you set it from 2 to 9, it will loop 8 times (2, 3, ... 9).
Now each time the loop starts a new loop, the value of YourLoopVar also changes, which is its main advantage - that is because you can also easily access the YourLoopVar and check it.

For example this below will write "Hello" when the 5th loop fires:
  • For each (Integer YourLoopVar) from 1 to 10, do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • YourLoopVar Equal to 5
        • Then - Actions
          • Game - Display to (All players) the text: Hello!
        • Else - Actions
The order in which all actions fire are as follow:
0) Trigger fires
1) Actions until the loop, in descending order
2) Loop starts -> starts from the "starting loop" X
3) Causes all actions inside the loop in the descending order
4) Loop changes now to the second loop (= x+1)
5) Again, in descending order does all actions which are inside the loop
6) Repeats until X=Y, then loop fires for the last time
7) Actions after loop in descending order.

------
What I meant by using loop in the player check part of the trigger is by checking player's index (... e.g. player 1 (Red)'s index is 1, player 2's index is 2 and so on).


------------------
[1] = You need only 1 integer variable intended for loop, which can be used in all triggers, however that integer variable should not be intended to save other data. Also if you make loop inside loop, you will need another integer variable.
This is a loop inside loop:
  • For each (Integer IntA) from 1 to 10, do (Actions)
    • Loop - Actions
      • -------- some actions here, which are specific for this first loop --------
      • For each (Integer IntB) from 1 to 10, do (Actions)
        • Loop - Actions
          • -------- some actions here, these will be looped IntA * IntB times, since it is inside 2 loops --------
 
Level 6
Joined
Feb 10, 2011
Messages
188
Another thing that i think you can do to shorten your trigger (number 3) is to just make it run a trigger that has an event repeat timer of .50 seconds. You can make the game count and when the count hits 30 turn off the trigger. (well, i guess you could use a loop for it to.)

heres an example

*the coding from ur trigger should be in the else section of the ITE, im just writing this so i cant get it to work right lol*

  • example
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Set Counter = (Counter + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Counter Greater than or equal to 30
        • Then - Actions
          • Set Counter = 0
          • Trigger - Turn off (This trigger)
        • Else - Actions
        • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
    • Unit Group - Add (Last created unit) to WaveThreeGroup
    • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
    • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
    • Special Effect - Destroy (Last created special effect)
also, there is probably even better ways of doing this, cause im pretty sure its not MUI
 
Level 14
Joined
Mar 27, 2008
Messages
1,003
Check the trigger again, what you posted switches off that other trigger if player 1 slot is used.


-------------
As for loops, this is loop:

This is how loop looks like in GUI:
  • For each (Integer YourLoopVar) from X to Y, do (Actions)
    • Loop - Actions
      • -------- Your actions here --------
It can be found in the action menu under "- General" tab as "For Each integer variable do multple actions".
First you need to create one generic integer variable you will use for all[1] your loops. In the trigger above I named this integer variable as "YourLoopVar".
In the action menu you can see there are also "For Each Integer A/Integer B variable do multiple actions" - don't use these, the're not as efficient.

Now you need to set X and Y to starting loop (X) and ending loop (Y). It is best to set X as 1, as it is the easiest to manipulate and for example count number of loops. Ending loop means which loop is the ending one.

So for example if you set Loop from 1 (= X) to 10 (= Y), then it will loop 10 times (1, 2, ... 10).
If you set it from 2 to 9, it will loop 8 times (2, 3, ... 9).
Now each time the loop starts a new loop, the value of YourLoopVar also changes, which is its main advantage - that is because you can also easily access the YourLoopVar and check it.

For example this below will write "Hello" when the 5th loop fires:
  • For each (Integer YourLoopVar) from 1 to 10, do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • YourLoopVar Equal to 5
        • Then - Actions
          • Game - Display to (All players) the text: Hello!
        • Else - Actions
The order in which all actions fire are as follow:


------
What I meant by using loop in the player check part of the trigger is by checking player's index (... e.g. player 1 (Red)'s index is 1, player 2's index is 2 and so on).


------------------
[1] = You need only 1 integer variable intended for loop, which can be used in all triggers, however that integer variable should not be intended to save other data. Also if you make loop inside loop, you will need another integer variable.
This is a loop inside loop:
  • For each (Integer IntA) from 1 to 10, do (Actions)
    • Loop - Actions
      • -------- some actions here, which are specific for this first loop --------
      • For each (Integer IntB) from 1 to 10, do (Actions)
        • Loop - Actions
          • -------- some actions here, these will be looped IntA * IntB times, since it is inside 2 loops --------

Have + Rep. You solved the problem of why it wouldn't work at all. Now the flag gets moved and the text displays, however the points still don't get added to the leaderboard. Also thanks for the Loop tutorial, I'm going to optimize the Wave triggers with it soon.

What happens if "The Crimson Flame 0008 <gen>" dies?

And for item, maybe try to drop the item first and then move it, but idk atm.

But anyway I think you have to work hard on all your triggers again, because I'm sure you can code it better. Nichilus is right, learn to loop and to simplify it

Yeah, Nichilus's Loop help will allow me to code it better. I'll try the drop item for an event instead and set a manipulating item condition or something similar.

Another thing that i think you can do to shorten your trigger (number 3) is to just make it run a trigger that has an event repeat timer of .50 seconds. You can make the game count and when the count hits 30 turn off the trigger. (well, i guess you could use a loop for it to.)

heres an example

*the coding from ur trigger should be in the else section of the ITE, im just writing this so i cant get it to work right lol*

  • example
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Set Counter = (Counter + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Counter Greater than or equal to 30
        • Then - Actions
          • Set Counter = 0
          • Trigger - Turn off (This trigger)
        • Else - Actions
        • Unit - Create 1 Ghoul (Wave Three) for Player 11 (Dark Green) at (Random point in SPAWN Plague <gen>) facing Default building facing degrees
    • Unit Group - Add (Last created unit) to WaveThreeGroup
    • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
    • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
    • Special Effect - Destroy (Last created special effect)
also, there is probably even better ways of doing this, cause im pretty sure its not MUI

+ Rep for saving me a lot of work. The only thing bad about this from what I can tell is that it leaks, and that's something that I have to fix.

I fixed one problem, but the problem still remains that points don't get added to the leaderboard. It's really frustrating.
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
That trigger can also be simplified to this:
  • Set WaveThree_RedPoints = (WaveThree_RedPoints + 1)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • WaveThree_RedPoints Equal to 3
    • Then - Actions
      • Game - Display to (All players) the text: Message
      • Player - Add 100 to Player 1 (Red) Current gold
      • Trigger - Run Wave 3 End <gen> (checking conditions)
    • Else - Actions
      • Wait 0.10 seconds
      • Leaderboard - Change the value for Player 1 (Red) in WaveThree_Leaderboard to WaveThree_RedPoints
I left out the messages which you placed in the "else" section of all three ITEs you used, since if you scored for example a 4th point, that message would be written 3 times (once per each ITE).

The trigger I posted showed correct score on the leaderboard. So if problems persist, you could try using debug messages, to even see if the actions of that trigger fire, when unit carries flag to that Food Market region.
 
Status
Not open for further replies.
Top