• 🏆 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!

Need Help - Life Open/Close Gate

Status
Not open for further replies.
Level 2
Joined
Dec 30, 2011
Messages
13
When a unit attack the Gate while this is opening(between 2 sec), and it open and then close... but all the damage taken(between 2 sec) does not appear.

What should i do?

Edit:

  • Gate 1
    • Events
      • Unit - A unit enters GATE 1 <gen>
    • Conditions
      • ((Entering unit) is A Hero) Equal to True
    • Actions
      • Set GateHP[1] = (Current life of Gate (Diagonal 1) 0000 <gen>)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • GateHP[1] Greater than 0.00
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • GateHP[1] Less than or equal to 0.00
            • Then - Actions
              • Skip remaining actions
            • Else - Actions
          • Wait 2.00 seconds
          • Destructible - Open Gate (Diagonal 1) 0000 <gen>
          • Wait 10.00 seconds
          • Destructible - Close Gate (Diagonal 1) 0000 <gen>
          • Destructible - Set life of Gate (Diagonal 1) 0000 <gen> to GateHP[1]
          • Trigger - Turn on (This trigger)
        • Else - Actions
  • Gate Turn
    • Events
      • Destructible - Gate (Diagonal 1) 0000 <gen> dies
    • Conditions
    • Actions
      • Trigger - Turn off Gate 1 <gen>
Here a map if you want it
epicwar.com/maps/299822/
 
Last edited:
Level 7
Joined
Jul 4, 2007
Messages
249
When a unit attack the Gate while this is opening(between 2 sec), and it open and then close... but all the damage taken(between 2 sec) does not appear.

What should i do?

Edit:

  • Gate 1
    • Events
      • Unit - A unit enters GATE 1 <gen>
    • Conditions
      • ((Entering unit) is A Hero) Equal to True
    • Actions
      • Set GateHP[1] = (Current life of Gate (Diagonal 1) 0000 <gen>)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • GateHP[1] Greater than 0.00
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • GateHP[1] Less than or equal to 0.00
            • Then - Actions
              • Skip remaining actions
            • Else - Actions
          • Wait 2.00 seconds
          • Destructible - Open Gate (Diagonal 1) 0000 <gen>
          • Wait 10.00 seconds
          • Destructible - Close Gate (Diagonal 1) 0000 <gen>
          • Destructible - Set life of Gate (Diagonal 1) 0000 <gen> to GateHP[1]
          • Trigger - Turn on (This trigger)
        • Else - Actions
  • Gate Turn
    • Events
      • Destructible - Gate (Diagonal 1) 0000 <gen> dies
    • Conditions
    • Actions
      • Trigger - Turn off Gate 1 <gen>
Here a map if you want it
epicwar.com/maps/299822/
Not sure what you want to achieve but this
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • GateHP[1] Less than or equal to 0.00
    • Then - Actions
      • Skip remaining actions
    • Else - Actions
can never trigger because it's inside of this
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • GateHP[1] Greater than 0.00
Should be like this
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • GateHP[1] Less than or equal to 0.00
    • Then - Actions
      • Skip remaining actions
    • Else - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • GateHP[1] Greater than 0.00
    • Then - Actions
      • Wait 2.00 seconds
      • Destructible - Open Gate (Diagonal 1) 0000 <gen>
      • Wait 10.00 seconds
      • Destructible - Close Gate (Diagonal 1) 0000 <gen>
      • Destructible - Set life of Gate (Diagonal 1) 0000 <gen> to GateHP[1]
      • Trigger - Turn on (This trigger)
    • Else - Actions
Or just do like this
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • GateHP[1] Greater than 0.00
    • Then - Actions
      • Wait 2.00 seconds
      • Destructible - Open Gate (Diagonal 1) 0000 <gen>
      • Wait 10.00 seconds
      • Destructible - Close Gate (Diagonal 1) 0000 <gen>
      • Destructible - Set life of Gate (Diagonal 1) 0000 <gen> to GateHP[1]
      • Trigger - Turn on (This trigger)
    • Else - Actions
 
Status
Not open for further replies.
Top