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

How do I make gates open and close as units

Status
Not open for further replies.
Level 2
Joined
Dec 10, 2008
Messages
12
I've been making a map which involves gates. and i know how to open and close them as destructibles,but it's harder for units to attack bases because they dont auto-attack the gates when assigned an attack move. So i tried to create gates as units and use spells to open them but i cant get the gate to play an open animaton. plz may someone tell me how to make it open. i would be very grateful:thumbs_up:
 
Level 18
Joined
Mar 7, 2005
Messages
824
uhm normally it should be easy.. "unit - play unit's death alternative animation"
and this doesn't work? I don't know why this shouldn't work, did you enter the correct animation tag? if you don't know it exactly go to the object editor choose your unitgate and click on it's model, as you would change it to another one. Now there's some small info and pic on the left side of the WE you can click and choose other animations for it.. look at the animation name and check it with your entered stuff.. but I don't see any problems why this shouldn't work as normally..
 
Level 3
Joined
Feb 20, 2009
Messages
28
you have to make a trigger..
  • OpenGate
  • Events
    • Unit - A unit enters (gate Region)
  • Conditions
    • (Entering Unit)is A Hero) Equal to True (<---i Think it will be Better)
  • Actions
    • Destructible - Open (Gate)
  • CloseGate
  • Events
    • Unit - A unit Leaves (gate Region)
  • Conditions
  • Actions
    • Destructible - Close (Gate)
 
Level 18
Joined
Mar 7, 2005
Messages
824
you have to make a trigger..
  • OpenGate
  • Events
    • Unit - A unit enters (gate Region)
  • Conditions
    • (Entering Unit)is A Hero) Equal to True (<---i Think it will be Better)
  • Actions
    • Destructible - Open (Gate)
  • CloseGate
  • Events
    • Unit - A unit Leaves (gate Region)
  • Conditions
  • Actions
    • Destructible - Close (Gate)

what has this to do with his problem? you using Destructable Gates.. he changed them into Units, and they don't playing the animations they should...
The other point is, why should they automatically open? i think he makes something like a Castle Builder where Gates should only be opened and closed by players, so your triggers making no sense here..
 
Level 2
Joined
Dec 10, 2008
Messages
12
Thanx Tr!KzZ, i think i must hav been spellin it wrong or sumthing bcos its working now. and thanks Kal'Mon but thats for a destuctible not a unit, but thanks anyway.
 
Level 2
Joined
Mar 29, 2009
Messages
16
hey, wat exactly did you use for it?
ive been trying for a week to figure it out but havent been able to, wat were the exact trigger functions u used?
 
Level 14
Joined
Mar 30, 2009
Messages
971
hey, wat exactly did you use for it?
ive been trying for a week to figure it out but havent been able to, wat were the exact trigger functions u used?

there is some other problem with the opening anim too. i managed with a variable before the action:

  • openclose
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Unit-type of (Casting unit)) Equal to Gate Horisontal
    • Actions
      • Set gate = (Casting unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Open
        • Then - Actions
          • Sound - Play LargeCityGateOpen1 <gen> at 100.00% volume, attached to (Casting unit)
          • Unit - Add Close to (Casting unit)
          • Unit - Remove Open from (Casting unit)
          • Animation - Play gate's Death Alternate animation
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Close
        • Then - Actions
          • Sound - Play LargeCityGateOpen1 <gen> at 100.00% volume, attached to (Casting unit)
          • Unit - Add Open to (Casting unit)
          • Unit - Remove Close from (Casting unit)
          • Animation - Play gate's stand animation
        • Else - Actions

----
And i fixed collison thing with replacing units
----
 
Last edited:
Status
Not open for further replies.
Top