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

[Trigger] Gate Open/Close problems

Status
Not open for further replies.
Level 8
Joined
May 15, 2008
Messages
258
Ive been trying a trigger like this

event
A unit starts to cast a spell

condition
(Ability being cast) equal to open

action
Replace (Casting unit) with a open gate using old unit: Rel. life and mana
Play (Last replaced unit)'s Death Alternate animation, using only common animations

and to close the gate

event
A unit starts to cast a spell

condition
(Ability being cast) equal to close

action
Replace (Casting unit) with a closed gate using old units: Rel. life and mana

But every time i try to use it nothing happens, i made the custom open and close abiltiys out of the footman defend ability. Do i need more custom stuff or something?
 
Level 7
Joined
Aug 27, 2008
Messages
378
Well, I'm no expert myself, but i think it might not work because you are using units. Try using gates, and doing this.
If you just want to make it so that people can walk in, and out of a gate you could make four regions two really thin ones in front of the gate, and two really thin ones behind the gate. For the quick diagram i am about to show -=region and |=the gate
so it looks like this (Assuming they are east to west.) --|--

And i will just number them 1-4 from east to west.

trigger 3
Event: Mat initialization
Action:turn off trigger 2
Action:turn off trigger 1

Trigger 4

Event: A Unit enters region 1
Action: Open gate
Action: Turn on trigger 1

Trigger 1
Event: Unit enters region 3
Action: Close gate
Action: Turn off this trigger

Trigger 5
Event: Unit enters region 4
Action: Open gate
Action: Turn on trigger 2

Trigger 2
Event: Unit enters region 2
Action: Close gate
Action: Turn off this trigger,
 
Level 17
Joined
Nov 18, 2008
Messages
1,538
bearform transforms one unit to another, so just set normal form to closed gate and morphed form to open gate. or whichever you want
 
Level 13
Joined
Sep 14, 2008
Messages
1,407
1. Create the unit which looks like the gate.
2. Give it the ability.
3. Create a "dummy" gate. No model, no shadow
4. place the "dummy" gate where the unit stands.
5. Create the triggers:

Event: Unit uses ability
Condition: Ability = open
Event:
Play unit death animation (if that is the open animation)
Destructible - Open Gate "dummy" gate

And the same thing with close.
That causes the dummy gate to be open when you cast the ability.
Units can't go through the "dummy" gate when its closes ALTHOUGTH it has no model.
 
Level 8
Joined
May 15, 2008
Messages
258
1. Create the unit which looks like the gate.
2. Give it the ability.
3. Create a "dummy" gate. No model, no shadow
4. place the "dummy" gate where the unit stands.
5. Create the triggers:

Event: Unit uses ability
Condition: Ability = open
Event:
Play unit death animation (if that is the open animation)
Destructible - Open Gate "dummy" gate

And the same thing with close.
That causes the dummy gate to be open when you cast the ability.
Units can't go through the "dummy" gate when its closes ALTHOUGTH it has no model.




Its a good way to do it, but with that way i hafto have already placed the gate (whell thats what it looks like). I hafto be able to "Build" the gate and be able to use the open/close things after its built by the player anywhere on the map.
 
Status
Not open for further replies.
Top