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