• 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.

Smart Gates [Nooby question]

Status
Not open for further replies.
Level 2
Joined
Mar 28, 2008
Messages
6
Hi, I'm doing a ORPG map and i don't know how to do a trigger. In my map there are 5 teams and i want the gate to open just to 1 team. So can somebody help me please?
 
Event-Unit Enters GateRegion
Condition-(Entering Unit) is in unit group (Owned by Player 1)
Trigger-Destructible Open (Gate)
Wait (2.00) Seconds
Destructible Close (Gate)

GateRegion should be a small region around the gate, if you can't figure that bit out. I just did that off've my head so i'm not sure that Condition is completly right.
 
Level 2
Joined
Mar 28, 2008
Messages
6
There are lots of gates and they only leads to the city of each race. But i done it thanks to Revellion (+rep)
 
Level 5
Joined
Mar 21, 2007
Messages
155
well thats fine and dandy. but for anti-bug purposes, you might want to make it so that if a enemy players unit that enters the gate area, just moves backwards. because otherwise, the other team can follow the one who's doing the gate opening. personally, i'd do this

  • gate thing
    • Events
      • Unit - A unit enters Region <gen>
      • Unit - A unit leaves Region <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to (Not on team)
        • Then - Actions
          • Unit - Move (Triggering unit) instantly to (Center of (Region 2))), facing Default building facing degrees
          • Game - Display to (Player group((Owner of (Triggering unit)))) for 5.00 seconds the text: Your Can't go in there
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • door_status[x] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Triggering unit) Equal to (Entering unit)
                • Then - Actions
                  • Game - Display to (Player group((Owner of (Triggering unit)))) for 5.00 seconds the text: This Door is Locked
                • Else - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Triggering unit) Equal to (Leaving unit)
                • Then - Actions
                  • Destructible - Close Gate
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Triggering unit) Equal to (Entering unit)
                • Then - Actions
                  • Destructible - Open Gate <gen>
                • Else - Actions
its slightly more, kwl. with region being the area around the gate, region 2 being an area away from the gate, but in the players camera view as if he was looking at the gate head on, expecting to go through it.

and uh, the door_status is for maybe you want to lock the door, prevent anyone from passing through it. e.g. a time out, start of game. whatever...

=D :thumbs_up:
 
Level 2
Joined
Mar 28, 2008
Messages
6
Thanks for trying to help but no i actualy want them to try to do that but i don't think that they manage to do that so easy... I want to add in my map sort of a town raiding like you go in to the town kill a specific number of units and get items from them. Like stealing...
 
Status
Not open for further replies.
Top