I Need Another Pair of Eyes on This Trigger

Squeekems

TH.net Regular
Reaction score
11
Here is what I want it to do: When a player's Great Hall falls below 50% hit-points and is attacked, it is forced to join the team of attacking player.
Here is the problem: I had it working and I can not figure out why it stopped working.

I suspect that the problem may lie in another trigger. I had tried to add messages that would be sent to all players involved in the take-over to inform them of what occurred, but the messages were causing crashes.

Trigger:
  • Conquer Great Hall
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Owner of (Triggering unit)) is an enemy of (Owner of (Attacking unit))) Equal to True
          • ((Triggering unit) is A structure) Equal to True
          • (Life of (Triggering unit)) Less than or equal to ((Max life of (Triggering unit)) / 2.00)
          • ((Triggering unit) is A town-hall-type unit) Equal to True
          • (Triggering unit) Not equal to Great Hall 0065 <gen>
          • (Triggering unit) Not equal to Great Hall 0066 <gen>
          • (Triggering unit) Not equal to Great Hall 0067 <gen>
          • (Triggering unit) Not equal to Great Hall 0068 <gen>
    • Actions
      • Unit - Set life of (Triggering unit) to 100.00%
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player number of (Owner of (Triggering unit))) Equal to iTeam[(Player number of (Owner of (Triggering unit)))]
        • Then - Actions
          • Player Group - Make pgTeam[(Player number of (Owner of (Triggering unit)))] treat (All players) as an Enemy
          • Player Group - Make (All players) treat pgTeam[(Player number of (Owner of (Triggering unit)))] as an Enemy
          • Player Group - Pick every player in pgTeam[(Player number of (Owner of (Triggering unit)))] and do (Actions)
            • Loop - Actions
              • Set iTeam[(Player number of (Picked player))] = (Player number of (Picked player))
              • Player Group - Add (Picked player) to pgTeam[(Player number of (Picked player))]
              • Player - Change color of (Picked player) to pcColor[(Player number of (Picked player))], Changing color of existing units
              • Player Group - Remove (Picked player) from pgTeam[(Player number of (Owner of (Triggering unit)))]
          • Set pgForce = (Player group((Owner of (Triggering unit))))
          • Player Group - Make pgTeam[iTeam[(Player number of (Owner of (Attacking unit)))]] treat pgForce as an Ally with shared vision
          • Player Group - Make pgForce treat pgTeam[iTeam[(Player number of (Owner of (Attacking unit)))]] as an Ally with shared vision
          • Set iTeam[(Player number of (Owner of (Triggering unit)))] = iTeam[(Player number of (Owner of (Attacking unit)))]
          • Player Group - Add (Owner of (Triggering unit)) to pgTeam[iTeam[(Player number of (Owner of (Attacking unit)))]]
          • Player - Change color of (Owner of (Triggering unit)) to (Color of (Owner of (Attacking unit))), Changing color of existing units
        • Else - Actions
          • Set pgForce = (Player group((Owner of (Triggering unit))))
          • Player Group - Make pgTeam[iTeam[(Player number of (Owner of (Attacking unit)))]] treat pgForce as an Ally with shared vision
          • Player Group - Make pgForce treat pgTeam[iTeam[(Player number of (Owner of (Attacking unit)))]] as an Ally with shared vision
          • Set iTeam[(Player number of (Owner of (Triggering unit)))] = iTeam[(Player number of (Owner of (Attacking unit)))]
          • Player Group - Add (Owner of (Triggering unit)) to pgTeam[iTeam[(Player number of (Owner of (Attacking unit)))]]
          • Player - Change color of (Owner of (Triggering unit)) to (Color of (Owner of (Attacking unit))), Changing color of existing units
      • Custom script: call DestroyForce(udg_pgForce)
 
Last edited:

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
So I'm assuming that nothing happens at all with the trigger now? What was working about it before? Was everything here working, or did you add some more to it that might have caused it to stop?

In any case, if I remember correctly (which I may not - it has been a while) I would suggest using Takes Damage instead of Is Attacked. I recall having better success with that trigger.
 

Squeekems

TH.net Regular
Reaction score
11
Everything about it was working. Now it only seems to be changing the color of the victim player.

I tried adding messages to it so that players were informed of what occurred.

I'm just going to work at it some more. Thanks for the reminder of Takes Damage.
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top