I can't see the trigger problem :(

Söder

New Member
Reaction score
1
Hi i'm trying to make my castle immortal when it's allied heroes are close to it, but it just wont work :( here is my trigger, please tell me whats wrong
Trigger:
  • Immortal
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units within 1200.00 of (Position of Castle 0010 <gen>)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • ((Owner of (Picked unit)) is an ally of (Owner of Castle 0010 <gen>)) Equal to True
                      • ((Picked unit) is A Hero) Equal to True
            • Then - Actions
              • Unit - Make Castle 0010 <gen> Invulnerable
            • Else - Actions
              • Unit - Make Castle 0010 <gen> Vulnerable
 

TheTempest

New Member
Reaction score
6
Pick every unit in 1200 range of castle matching condition of unit-type equal to hero and is allied.

Make castle invul, or vulnerable
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Just a question, why do you have 3 "And"s inside eachother ? :S

Use this instead, as your trigger both leaks, and apparently don't work ;)

Trigger:
  • Unit Invulnerable
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set TempPoint = (Position of Castle 0010 <gen>)
      • Set TempGroup = (Units within 1200.00 of TempPoint matching ((((Matching unit) belongs to an ally of (Owner of Castle 0010 <gen>)) Equal to True) and (((Matching unit) is A Hero) Equal to True)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in TempGroup) Greater than 0
        • Then - Actions
          • Unit - Make Castle 0010 <gen> Invulnerable
        • Else - Actions
          • Unit - Make Castle 0010 <gen> Vulnerable
      • Custom script: call DestroyGroup(udg_TempGroup)
      • Custom script: call RemoveLocation(udg_TempPoint)
 

Söder

New Member
Reaction score
1
how do u do that xD i tried but can't find al lthe triggers, please send a trigger in wc3 text GUI like i did :)
 

Söder

New Member
Reaction score
1
yeah sry didnt see it xD :p
but can u jsut tell me what the name of the condition you use after u said set tempgroup blalbla all units in range of castle? the "(((matching unit" part XD
 

Grymlax

Probably not around
Reaction score
138
(Matching unit) is A Hero) Equal to True)) is a boolean comparison and (((Matching unit) belongs to an ally of (Owner of Castle 0010 <gen>)) Equal to True) is also a boolean comparison

basically anything that is either a yes or no condition is a boolean.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
That's also a boolean comparison, under Unit - Unit Belongs To An Ally Of Player
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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