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

Gate Open and Close Help

Status
Not open for further replies.
Level 3
Joined
Sep 6, 2004
Messages
36
I need help with this. What I wnat this to do is when an ally of the owner of the gate is close to the gate it opens and they go through.

The only problem I have is that it is owned by a player therefore not making it a destructable. I can get it to open and close (playing Anamations) but I can't get it to let units go through because it still has a collision size.
 
Level 2
Joined
Feb 14, 2005
Messages
15
make it a destructible, then make a variable for each
player. then a region by the gate.
event: unit enters region
condition: unit is owned by variable player one
action: destructible open gate xxx.
something like that.
 
Level 3
Joined
Sep 6, 2004
Messages
36
The thing is the Gate has to be a unit. so you can't pick the gate to open it. maybe if there is a way to make the Destructable owned by a player.
 
Level 6
Joined
Feb 15, 2005
Messages
183
do you really need to make the gate itself owned? could you somehow put colored banners near the gate to say that this is "red" gate for example.

The only other thing i can think of, is making another unit and calling it "opengate". when matching owner unit walks into region, or within range or something, you replace closedgate with opengate, two seperate units with different collision sizes, but with the same model. The only trouble with that, is if you leave the region and the gate closes with someone going through it, I believe the gate will become misplaced.
 
Level 7
Joined
Jul 30, 2004
Messages
451
yeah i've already done that with a buildable door unit, basically easiest way i suppose is to replace the door with another unit with no collision then place some blockers at the base of the door
of course you have to check if there are units obstructing the door when it gets placed back or like draqz said, it will get misplaced
 
Level 3
Joined
Sep 6, 2004
Messages
36
I kind of tried that but i messed up somthing because when ever someone would activate the trigger the game would freeze up. so could someone tell what is wring with my trigger.

Events - Unit enters (region)

Conditions - Entering unit Egual to an ally of (Player 1)

Actions -

Replace (Gateclosed) with (Gateopen) using old units relitive life and mana

Play last replaced units anamation (death alternate)

Wait (5.00) seconds

Play last replaced units anamtion (stand)

Wait (0.50) seconds

Replace (last replaced unit) with (Gateclosed) using old units relitive life and mana

Gate closed has 0 collision size.
 
Status
Not open for further replies.
Top