• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Uber noob needs gate trigger help

Status
Not open for further replies.
Level 4
Joined
Jul 21, 2010
Messages
77
hey ive been trying to make a gate trigger with these properties but i dont know how to do it i really need step by step instructions for this thats very discriptive.

What the trigger is supposed to do:
a unit hits a lever and the gate opens if he hits it again the gate closes.

Please help and many blood elves to the one who does help
:spell_breaker::spell_breaker::spell_breaker:
 
Level 8
Joined
Jun 16, 2008
Messages
333
i throw together some triggers but idk if they work... didnt try it
but you have to make a variable that is a boolean and have it false
  • Untitled Trigger 001
    • Events
      • Unit - A unit enters Region 052 <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • openclose Equal to False
        • Then - Actions
          • Set openclose = True
          • Destructible - Open Demonic Gate (Diagonal 1) 0235 <gen>
        • Else - Actions
and to close it
  • Destructible - Close Demonic Gate (Diagonal 1) 0235 <gen>
{EDIT}
Sorry my computer wont let me edit it but to close
  • Untitled Trigger 001 Copy
    • Events
      • Unit - A unit enters Region 052 <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • openclose Equal to True
        • Then - Actions
          • Set openclose = False
          • Destructible - Close Demonic Gate (Diagonal 1) 0235 <gen>
        • Else - Actions
 
Last edited by a moderator:
Level 11
Joined
Sep 12, 2008
Messages
657
Exectly what he didnt need.. what he needs is this:

  • Untitled Trigger 001
    • Events
      • Destructible - PickLevelInEditor <gen> dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Lever_Bolean Equal to False
        • Then - Actions
          • Destructible - Open PickGateInEditor <gen>
          • Destructible - Resurrect PickLeverInEditor <gen> with (Max life of (Last created destructible)) life and Hide birth animation
          • Set Lever_Bolean = True
        • Else - Actions
          • Destructible - Close PickGateInEditor <gen>
          • Destructible - Resurrect PickLeverInEditor <gen> with (Max life of (Last created destructible)) life and Hide birth animation
          • Set Lever_Bolean = False
 
Level 4
Joined
Jul 21, 2010
Messages
77
thanks yall =) i really need this for my new map im working on many blood elfs to you =)

:spell_breaker::spell_breaker::spell_breaker::spell_breaker::spell_breaker::spell_breaker:

I like both ideas

but one question mister/misses iown_azz how do i set that trigger to work for a certain team or like make it work for player one and his team mates?

and my question for you mister/misses dardas is should i with the variable use?

Variable name: what you said
Variable type: destructable-type
Initial Value: lever
 
Last edited:
Level 8
Joined
Jun 16, 2008
Messages
333
ok now you want to make a variable
Force = PlayerGroup
to open it add this as a trigger... note that the first one didn't work
  • Untitled Trigger 001
    • Events
      • Unit - A unit enters Region 000 <gen>
    • Conditions
    • Actions
      • Set Force = (All allies of Player 1 (Red))
      • Player Group - Pick every player in Force and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Triggering unit)) Equal to (Picked player)
            • Then - Actions
              • Destructible - Open Elven Gate (Horizontal) 0000 <gen>
              • Game - Display to Force the text: ((Name of (Owner of (Triggering unit))) + has opened the gate)
            • Else - Actions
      • Custom script: call DestroyForce(udg_Force)
      • Wait 0.05 seconds
      • Trigger - Turn on Untitled Trigger 002 <gen>
      • Trigger - Turn off (This trigger)
now to close, but you need to make sure the check is off for Initially On
  • Untitled Trigger 002
    • Events
      • Unit - A unit enters Region 000 <gen>
    • Conditions
    • Actions
      • Set Force = (All allies of Player 1 (Red))
      • Player Group - Pick every player in Force and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Triggering unit)) Equal to (Picked player)
            • Then - Actions
              • Destructible - Close Elven Gate (Horizontal) 0000 <gen>
              • Game - Display to Force the text: ((Name of (Owner of (Triggering unit))) + has closed the gate)
            • Else - Actions
      • Custom script: call DestroyForce(udg_Force)
      • Wait 0.50 seconds
      • Trigger - Turn on Untitled Trigger 001 <gen>
      • Trigger - Turn off (This trigger)
I also add the mde it where it wont leak so copy as is or it might like bad
 
Level 4
Joined
Jul 21, 2010
Messages
77
Figured it out what i was looking for

Finally i figured out what i was looking for thank you all so much. like i said to those who would help me many many blood elfs to you all


:spell_breaker::spell_breaker::spell_breaker:
:spell_breaker::spell_breaker::spell_breaker:
:spell_breaker::spell_breaker::spell_breaker:
:spell_breaker::spell_breaker::spell_breaker:
:spell_breaker::spell_breaker::spell_breaker:

or should i say an army of them? ROFL
 
Level 8
Joined
Apr 8, 2009
Messages
499
ok now you want to make a variable
Force = PlayerGroup
to open it add this as a trigger... note that the first one didn't work
  • Untitled Trigger 001
    • Events
      • Unit - A unit enters Region 000 <gen>
    • Conditions
    • Actions
      • Set Force = (All allies of Player 1 (Red))
      • Player Group - Pick every player in Force and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Triggering unit)) Equal to (Picked player)
            • Then - Actions
              • Destructible - Open Elven Gate (Horizontal) 0000 <gen>
              • Game - Display to Force the text: ((Name of (Owner of (Triggering unit))) + has opened the gate)
            • Else - Actions
      • Custom script: call DestroyForce(udg_Force)
      • Wait 0.05 seconds
      • Trigger - Turn on Untitled Trigger 002 <gen>
      • Trigger - Turn off (This trigger)
now to close, but you need to make sure the check is off for Initially On
  • Untitled Trigger 002
    • Events
      • Unit - A unit enters Region 000 <gen>
    • Conditions
    • Actions
      • Set Force = (All allies of Player 1 (Red))
      • Player Group - Pick every player in Force and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Triggering unit)) Equal to (Picked player)
            • Then - Actions
              • Destructible - Close Elven Gate (Horizontal) 0000 <gen>
              • Game - Display to Force the text: ((Name of (Owner of (Triggering unit))) + has closed the gate)
            • Else - Actions
      • Custom script: call DestroyForce(udg_Force)
      • Wait 0.50 seconds
      • Trigger - Turn on Untitled Trigger 001 <gen>
      • Trigger - Turn off (This trigger)
I also add the mde it where it wont leak so copy as is or it might like bad


you actually stil didnt need vars.

could use:
  • ((owner of (Entering unit)) is an ally of player 1 (red)) Equal to True
can be found under "Boolean Comparison".
 
Status
Not open for further replies.
Top