• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] The Forbidden Trigger

Status
Not open for further replies.
Level 19
Joined
Oct 29, 2007
Messages
1,184
As soon as I enable this trigger right here while playing over lan, and somebody enters a building the game crashes... What the fuck? Can someone please explain to me why this happens? : <

  • Enter Buildings
    • Events
      • Unit - A unit enters Building 1 <gen>
      • Unit - A unit enters Building 2 <gen>
      • Unit - A unit enters Building 3 <gen>
      • Unit - A unit enters Building 4 <gen>
      • Unit - A unit enters Building 5 <gen>
      • Unit - A unit enters Building 6 <gen>
      • Unit - A unit enters Building 7 <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to |cff00bfffSpecial Forces|r
    • Actions
      • Wait 0.27 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Building 1 <gen> contains (Triggering unit)) Equal to True
              • (Building 2 <gen> contains (Triggering unit)) Equal to True
              • (Building 3 <gen> contains (Triggering unit)) Equal to True
              • (Building 4 <gen> contains (Triggering unit)) Equal to True
              • (Building 5 <gen> contains (Triggering unit)) Equal to True
              • (Building 6 <gen> contains (Triggering unit)) Equal to True
              • (Building 7 <gen> contains (Triggering unit)) Equal to True
        • Then - Actions
          • For each (Integer tmp_integer) from 1 to 4, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Triggering unit) Equal to Player[tmp_integer]
                • Then - Actions
                  • Set NoSun[tmp_integer] = 1
                  • Unit - Hide lightning_glow[tmp_integer]
                  • Unit - Hide lightning_glow2[tmp_integer]
                • Else - Actions
        • Else - Actions
 
Level 3
Joined
May 2, 2008
Messages
41
How can triggering unit be equal to a player?
And the first If is not needed. If the unit just entered the region then it is there. No need to check it
 
(Building 1 <gen> contains (Triggering unit)) Equal to True
How come? It should be "Region contains "point"", not "unit".
Anyway, since a unit enters that specific region, that event fires those actions, so adding a condition that checks if the region contains the unit is useless. It will of course return the "True" value, since it is relevant to the event "Unit Enters region", that fires the actions of the trigger. Entering in a region means that region contains my position already. You already checked the unit-type.
 
Status
Not open for further replies.
Top