• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

[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