Life Losing Problem

ZiggyMcjoney

Data editor?! AAAHHHHH!
Reaction score
95
EDIT: Problem resolved via use of eyes, thanks anyway guys :p

Well for anyone who's played Achievement TD before you'll know that when you get to level 11 theres a shiny orb boss that pulls the portal closer to the end spawn point if you don't kill him before he gets a certain distance through the maze. If you haven't played Achievement TD, you now know that as well.

Now the problem is that on wave 23, you get to choose between two sides of a little 'army', and the two sides fight in the middle of the maze. This is all well and good except that when you choose to fight for the "Arche 'n' Dave" side of the battle, the Aendri mobs have had to have their own trigger to lose lives by entering the spawn point, rather than the end point, because they spawn at the end point and move to the spawn point. If that makes any sense at all.

Diagram for help-ness (this isn't what the maze looks like in-game)

Code:
[X==============Z=============Y]
Normally = Mobs spawn at X, ignore Z, move to Y, take a life
Wave 23, 24 and 25 = Some mobs spawn at X, some at Y, they meet at Z, fight, the remaining ones that spawned at X move to Y, the remaining that spawned at Y move to X, take off lives.

So this basically means that I've had to create a separate take-lives-off-trigger for the mobs that head to X, because lives aren't normally removed at X. THIS works fine. What the problem is is, when the portal is moved closer to the end by that boss at wave 11, I've had to make yet another set of triggers to allow those mobs to take off lives. THIS is not working.

Here is the trigger for moving the portal:
Trigger:
  • Wave 11 ii
    • Events
      • Unit - A unit enters PortalMovesHere <gen>
      • Unit - A unit enters PortalMovesHere2 <gen>
      • Unit - A unit enters PortalMovesHere3 <gen>
      • Unit - A unit enters PortalMovesHere4 <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to An entrancingly sparkly orb
    • Actions
      • Game - Display to (Player group((Player(((Player number of (Owner of (Triggering unit))) - 4))))) the text: |cffff0000The spark...
      • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Orc\Voodoo\VoodooAura.mdl
      • Set ShinyEffect[(Player number of (Owner of (Triggering unit)))] = (Last created special effect)
      • Set StopOrb[(Player number of (Owner of (Triggering unit)))] = True
      • Unit - Order (Triggering unit) to Stop
      • Wait 8.00 seconds
      • Set StopOrb[(Player number of (Owner of (Triggering unit)))] = False
      • Special Effect - Destroy ShinyEffect[(Player number of (Owner of (Triggering unit)))]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is alive) Equal to True
        • Then - Actions
          • Unit - Order (Triggering unit) to Stop
          • Set HesMovedIt[(Player number of (Owner of (Triggering unit)))] = True
          • Game - Display to (Player group((Player(((Player number of (Owner of (Triggering unit))) - 4))))) the text: |cffff0000The orb h...
          • Set SpawnPoint[((Player number of (Owner of (Triggering unit))) - 4)] = ChangedSpawnPoint[((Player number of (Owner of (Triggering unit))) - 4)]
          • Set Temp_Point_2 = (Center of NewStartRegion[((Player number of (Owner of (Triggering unit))) - 4)])
          • Set Temp_Point = (Temp_Point_2 offset by (0.00, 50.00))
          • Destructible - Remove PlayersPortal[((Player number of (Owner of (Triggering unit))) - 4)]
          • Destructible - Create a Shimmering Portal at Temp_Point facing 270.00 with scale 1.00 and variation 0
          • Unit - Order (Triggering unit) to Move To EndPoint[((Player number of (Owner of (Triggering unit))) - 4)]
          • Custom script: call RemoveLocation (udg_Temp_Point)
          • Custom script: call RemoveLocation (udg_Temp_Point_2)
        • Else - Actions


And here is one of the triggers for losing a life:

Trigger:
  • LoseFromAenP1Moved
    • Events
      • Unit - A unit enters PortalMovesHere <gen>
    • Conditions
      • HesMovedIt[1] Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 11 (Dark Green)
          • ((Triggering unit) belongs to an enemy of Player 1 (Red)) Equal to True
        • Then - Actions
          • Unit - Remove (Entering unit) from the game
          • Set Lives[1] = (Lives[1] - 1)
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row 4 to (String(Lives[1]))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Lives[1] Less than or equal to 0
            • Then - Actions
              • Game - Display to (Player group(Player 1 (Red))) the text: You have been defea...
              • Set Temp_Group = (Units owned by Player 1 (Red))
              • Unit Group - Pick every unit in Temp_Group and do (Actions)
                • Loop - Actions
                  • Unit - Remove (Picked unit) from the game
              • Custom script: call DestroyGroup (udg_Temp_Group)
              • Set IsDead[1] = True
            • Else - Actions
              • Game - Display to (Player group(Player 1 (Red))) the text: (Life lost! + ( + ((String(Lives[1])) + lives remaining.)))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Lives[1] Less than 2
                • Then - Actions
                  • Player - Set the current research level of Uh-Oh to 1 for Player 1 (Red)
                  • Player - Add 1 to Player 1 (Red) Current lumber
                  • Game - Display to (Player group((Player(((Player number of (Owner of (Triggering unit))) - 4))))) the text: |c003366ffACHIEVEME...
                  • Hero - Create |cff9400d3Sympathy|r and give it to Builder[1]
                  • Set AchievementCount[1] = (AchievementCount[1] + 1)
                  • Set Temp_Integer = 1
                  • Trigger - Run LandmarkAchievements <gen> (checking conditions)
                • Else - Actions
        • Else - Actions


HesMovedIt is a variable that is set to True if the shiny orb moves the portal. PortalMovesHere is the region that the new portal moves to.

Hopefully you can help, notify me if I've missed anything.

NOTE: I DIRECTLY copied the life lose trigger from another one and changed the event and condition and nothing else, so I doubt that that's the cause.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top