How to make a gate-unit?

Demonfaze

8 yrs. Hell, it's been a long time.
Reaction score
72
I want to make a gate that can open/close (pathing must work also).

But it has to be a unit (or at least behave like a unit).
EX: hit points/armor/upgrades/etc

How to do this? I can do it if its a destructable but I dont know how to do it with a unit.

Thanks.
 

lllidan

New Member
Reaction score
22
Well I know there a number of things you can do, but I'm not sure what you're after. Do you want it still to look like a gate, but be a unit? Do you want it to be a moveable gate? Do you want it to have a unit model, with no open animation (how would you "open" a footman) but still open/close paths with pathing blockers?
 

Demonfaze

8 yrs. Hell, it's been a long time.
Reaction score
72
sorry that i wasn't clear...i'll try again:

1) I have a peasant.

2) He can build a gate (place wherever you want) just like a unit.

3) The gate looks like a gate <horizontal> and has the ability "Open Gate"

If you use Open Gate, it changes the model and pathing to dead gate <horizontal> ... aka it opens the gate. It can still be attacked, but units may pass through. Also has the ability Close Gate.

If you use Close Gate, it changes the model and pathing to the original gate: units cannot pass through.

4) I want the gate to have armor, such as fortified armor. So the simple destructable hit points won't work.

If unclear I send you a map that has what I want in it. Protected & I forgot how to unprotect maps :mad: but you can see it in-action in-game.
 
S

Sheepyboy

Guest
just replace unit with another one

Event-
A unit Casts an ability
Conditions-
(Ability Being Cast) Equal to "Open Gate"
Actions-
Replace (Triggering Unit) with "Opened gate" using old units relative health and mana

that should work- just make one unit (Closed Gate) with pathing and one uniit (Open gate) with no pathing. O, andmake another trigger for "CLose Gate"
 

Demonfaze

8 yrs. Hell, it's been a long time.
Reaction score
72
sounds good except how do i get opened gate to look like an opened gate..i can't find the path when it's a unit
 

lllidan

New Member
Reaction score
22
Have the replaced unit use the opened gate's model, but use the circle of power or something (no collision) pathing.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
I would suggest the following:

Make two versions of each door,
one with the pathing of the closed gate, that's the one your builder will construct,
and one with the pathing of the opened gate.

Then make a custom Bear Form ability, with no mana cost and no requirements and no wait time,
set it to switch between the two doors,
and give it to both doors.

And a trigger to show the actual "open" animation:
Code:
Open Gate
    Events
        Unit - A unit Finishes casting an ability
    Conditions
        (Unit-type of (Triggering unit)) Equal to Horizontal Gate (Opened)
    Actions
        Animation - Play (Triggering unit)'s death alternate animation
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Hm... well, there's some major problem here though...

Both the "horizontal" and "vertical" versions of gates use the very same model and pathing map.
Destructibles come with a "default rotation" that allows (obviously) rotation.

Units don't though.

And, while you can rotate them once they are placed, that doesn't help with choosing some spot to put them...
 

Demonfaze

8 yrs. Hell, it's been a long time.
Reaction score
72
ah i see, so it is impossible to make a vertical gate buildable? Other than a long time-wasting trigger...

EDIT: ALSO...

When i play the gate's death alternate animation, it screws the game up & gets a fatal error.... ><
 

Demonfaze

8 yrs. Hell, it's been a long time.
Reaction score
72
bump

- it works nicely (i even have a vertical gate)

but a new problem:

How do you prevent stacking gates?

Here's how to stack them at teh moment:

1) Build a gate (closed)
2) Open it
3) Build another gate (closed) on top of the open gate beacuse it has no pathing.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top