• 🏆 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] Serious problem with gate system

Status
Not open for further replies.
Level 8
Joined
Sep 24, 2007
Messages
300
Hello guys. I am facing a serious problem with gate open/close system, and I'd need some serious help.

I am using a unit with open/close abilities to open/close a specific gate.

  • open and close
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Gate Lever
    • Actions
      • -------- OPEN --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Open Gate
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Triggering unit) Equal to Gate Lever 0020 <gen>
            • Then - Actions
              • Destructible - Open Iron Gate (Vertical) 0076 <gen>
            • Else - Actions
              • ...
        • Else - Actions
      • -------- CLOSE --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Close Gate
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Triggering unit) Equal to Gate Lever 0020 <gen>
            • Then - Actions
              • Destructible - Close Iron Gate (Vertical) 0076 <gen>
            • Else - Actions
              • ...
This works well. Gate is opening and closing when the abilities are being cast. Now to the problem.

If you destroy the gate and then use open/closeabilities, the gates are RENEWED, meaning they get full HP back. To counter this, I created a trigger that removes the lever when gate is destroyed.
  • gate MT south off
    • Events
      • Destructible - Iron Gate (Vertical) 0076 <gen> dies
    • Conditions
    • Actions
      • Unit - Remove Gate Lever 0020 <gen> from the game
And now to the real problem: Lever is removed after you cast its ability! Open/Close gate seem to mean (to W3) the same as "Destructible Dies".


How to bypass this? Any ideas are welcome.


PS: I am not going to use units as gates. Period.


Regards
 
Status
Not open for further replies.
Top