• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Gate Close Trigger Not Working? Plz Help

Status
Not open for further replies.
Level 18
Joined
Mar 16, 2008
Messages
721
I have a gate -open and -close trigger, it was working. I just added a death trigger because players were abusing the -close trigger, it seems to re-create the gate if it was dead.

Any ideas??? Thanks.

  • Open Port Red
    • Events
      • Player - Player 1 (Red) types a chat message containing -open as An exact match
    • Conditions
    • Actions
      • Destructible - Open Royal Port Gate (Horizontal) 7764 <gen>
and
  • Close Port Red
    • Events
      • Player - Player 1 (Red) types a chat message containing -close as An exact match
    • Conditions
    • Actions
      • Destructible - Close Royal Port Gate (Horizontal) 7764 <gen>
and
  • Port Gate Dies Red
    • Events
      • Destructible - Royal Port Gate (Horizontal) 7764 <gen> dies
    • Conditions
    • Actions
      • Trigger - Turn off Open Port Red <gen>
      • Trigger - Turn off Close Port Red <gen>
 

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,687
What's the issue? The open/close triggers still work even after the gate dies? Are you saying that the triggers aren't being turned off?

There should be a Condition to check if a Destructible is alive or not.
 
Last edited:
Level 18
Joined
Mar 16, 2008
Messages
721
the -close trigger is not working.

should i just delete the death trigger and add alive conditional?

sorry if i wasn't clear.

I'll go with this. I imagine it will work. Thank you, Uncle!

  • Open Port Red
    • Events
      • Player - Player 1 (Red) types a chat message containing -open as An exact match
    • Conditions
      • (Royal Port Gate (Horizontal) 7764 <gen> is alive) Equal to True
    • Actions
      • Destructible - Open Royal Port Gate (Horizontal) 7764 <gen>
and
  • Close Port Red
    • Events
      • Player - Player 1 (Red) types a chat message containing -close as An exact match
    • Conditions
      • (Royal Port Gate (Horizontal) 7764 <gen> is alive) Equal to True
    • Actions
      • Destructible - Close Royal Port Gate (Horizontal) 7764 <gen>
I deleted the "death" trigger that disabled the other two. I think that trigger was running when I player used the -open trigger for some reason.
 
Last edited:

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,687
I'm beginning to think Opening/Closing gates actually creates/kills them, which would explain the problem.

If that condition doesn't work then try using a new Boolean variable to determine the state of the gate.

That aside, I'm curious as to whether or not Turn off trigger is working as intended. Someone else was having trouble with it before and I have a hunch that it's bugged.
 
Level 18
Joined
Mar 16, 2008
Messages
721
I've searched the forums and this seems like it might be more complicated than i expected.

The condition triggers above aren't working. I removed the conditions but then the -close command can be exploited to revive the gate at full health. So back to square one.

I've tried making the two triggers from this post: Opening/Closing Gates
But it doesn't seem to work still. The -close command can still be exploited. The index variables confuse me to be honest.

  • Set Port Gate Variables
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set VariableSet Port_Gates[1] = Royal Port Gate (Horizontal) 7764 <gen>
      • Set VariableSet Port_Gates[2] = Royal Port Gate (Vertical) 7763 <gen>
      • Set VariableSet Port_Gates[3] = Royal Port Gate (Horizontal) 7765 <gen>
      • Set VariableSet Port_Gates[4] = Royal Port Gate (Vertical) 7762 <gen>
      • For each (Integer A) from 1 to 4, do (Actions)
        • Loop - Actions
          • Trigger - Add to Port Gate Destroyed <gen> the event (Destructible - Port_Gates[(Integer A)] dies)
  • Port Gate Destroyed
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 4, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Dying destructible) Equal to Port_Gates[(Integer A)]
            • Then - Actions
              • Set VariableSet Port_Gates[(Integer A)] = No destructible
            • Else - Actions
 
Last edited:

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,687
Those triggers you posted are just one small chunk of the whole method described in that post. You're missing the rest of them.

Anyway, forget that, try your original -open/-close triggers but do something like this:

  • Events
  • Player - Player 1 (Red) types a chat message containing -open as An exact match
  • Conditions
  • GateIsDead Equal to False
  • Actions
  • Trigger - Turn off Gate Dies
  • Destructible - Open Royal Port Gate (Horizontal) 7764 <gen>
  • Trigger - Turn on Gate Dies
  • Events
  • Player - Player 1 (Red) types a chat message containing -close as An exact match
  • Conditions
  • GateIsDead Equal to False
  • Actions
  • Trigger - Turn off Gate Dies
  • Destructible - Close Royal Port Gate (Horizontal) 7764 <gen>
  • Trigger - Turn on Gate Dies

Then in the Gate Dies trigger:
  • Events
  • Destructible - Royal Port Gate (Horizontal) 7764 <gen> dies
  • Conditions
  • Actions
  • Set Variable GateIsDead = True
GateIsDead is a Boolean variable.


If Turn off trigger doesn't work because it's bugged then we'll need another Boolean variable that prevents Gate Dies from running in response to it being Opened/Closed. If that's the case then you'd want to replace the Turn on/Turn off actions with this new Boolean variable, setting it to True/False in their place. Finally, you would add a condition to the Gate Dies trigger that checks if this new boolean is False. Something like this:
  • Events
  • Player - Player 1 (Red) types a chat message containing -close as An exact match
  • Conditions
  • GateIsDead Equal to False
  • Actions
  • Set Variable DisableGateDies = True
  • Destructible - Close Royal Port Gate (Horizontal) 7764 <gen>
  • Set Variable DisableGateDies = False
^ Do this for both open/close triggers.
  • Events
  • Destructible - Royal Port Gate (Horizontal) 7764 <gen> dies
  • Conditions
  • DisableGateDies Equal to False
  • Actions
  • Set Variable GateIsDead = True
 
Last edited:
Status
Not open for further replies.
Top