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

Addition to my walls. Only one thing - I doubt that I'm not quite correctly named the animations, which opens and closes doors. If names of are wrong - tell me, and i will fix it.

Changelog:

1.01 - added overhead and origin refs.

Keywords:
Gate
Contents

Gate (Model)

Reviews
15:07, 31st Mar 2016 The_Silent: The same as your other models. Add "Overhead" and "Origin" attachment points. Changes made. Approved

Moderator

M

Moderator

15:07, 31st Mar 2016
The_Silent: The same as your other models.

Add "Overhead" and "Origin" attachment points.

Changes made. Approved
 
Level 11
Joined
Apr 9, 2013
Messages
710
The mesh as always is very good the Gate itself is a bit blurry but egh.., The problem is that you're gonna need some custom pathing for it to work properly as it's size doesn't much help it. On another note it doesn't even fit with your wall models, while you got the wall thickness well for the standard ingame path the wall falls a bit too short so once, again you will need custom pathing. (same applies to the gate, the thickness is right to say for the "Gate" Path but it falls short)
What I suggest is that you make the walls as thick as the Gate House and make them fit a pathing that is in the ingame, alternatively (which I would recommend) you could also make your own pathing and not have to re-mesh the model to fit a certain pathing (having the walls and gate same size would help). Gates are very tricky busines as you even need yet another pathing for the opened version not to say the vertical version. (as when you try to open/close it the gate itself will move off)
Obviously none of these are necessary to get approved on hive but it would really' help the user.
 
Level 4
Joined
Aug 6, 2014
Messages
87
(as when you try to open/close it the gate itself will move off)

Gate Closed:

Pathing Map: Magic Pen Wall <base> (fits it perfectly)
Collision size: 14


Gate open:
Pathing map: None (Best way would be to add a pathing map with building block or add un-buildable terrain below the gate so there won't be built buildings inside of it.)
Collision size: 0
Spell: Close Gate
- (Trigger: Unit X casts spell >Close Gate<, if there are units in range (190 range)classification IsAStructure = false, abort and don't turn back into a closed gate, if it works: save pos of closed gate, remove closed gate add add
- open gate to saved position of open gate)

Can't see a problem with that.
 
Level 4
Joined
Aug 6, 2014
Messages
87
It works the same... Lol. (Except the Tile thing but u can still search for nearby gates at the constructed building and abort)


And you don't need to pre-define anything.

My actual trigger:

  • gate system
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Close Gate
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
            • (Number of units in (Units within 190.00 of (Position of (Casting unit)) matching (((Matching unit) is A structure) Equal to False))) Equal to 0
            • Then - Actions
              • Set gate_pos = (Position of (Casting unit))
              • Set gate_hp = (Percentage life of (Casting unit))
              • Unit - Remove (Casting unit) from the game
              • Unit - Create 1 Wooden Gate (closed) for (Owner of (Casting unit)) at gate_pos facing Default building facing degrees
            • Unit - Set life of (Last created unit) to gate_hp%
            • Else - Actions
              • Game - Display to (Player group((Owner of (Casting unit)))) the text: You can't have any ...
    • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Open Gate
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in (Units within 190.00 of (Position of (Casting unit)) matching (((Matching unit) is A structure) Equal to False))) Equal to 0
              • Then - Actions
                • Set gate_pos = (Position of (Casting unit))
                • Set gate_hp = (Percentage life of (Casting unit))
                • Unit - Remove (Casting unit) from the game
                • Unit - Create 1 Wooden Gate (open) for (Owner of (Casting unit)) at gate_pos facing Default building facing degrees
                • Unit - Set life of (Last created unit) to gate_hp%
              • Else - Actions
                • Game - Display to (Player group((Owner of (Casting unit)))) the text: You can't have any ...
        • Else - Actions
 
Last edited:
Level 21
Joined
Dec 4, 2007
Messages
1,473
In order to play the right unit animation, i am using this fix:

  • FrontierGateAnim
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • Multiple ConditionsOr - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to (==) Gate Control (FrontierGate)
          • (Ability being cast) Equal to (==) Gate Control (FrontierGate)2
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of GateState (open) for (Triggering unit)) Equal to (==) 1
        • Then - Actions
          • Animation - Play (Triggering unit)'s stand alternate animation
          • -------- PathingUpdateFix --------
          • Set temp_point = (Position of (Triggering unit))
          • Set temp_point_array[1] = (temp_point offset by 250.00 towards 270.00 degrees)
          • Set temp_point_array[2] = (temp_point offset by 250.00 towards 90.00 degrees)
          • Unit - Create 1 dummy unit (GatePathUpdater) for (Owner of (Triggering unit)) at temp_point facing Default building facing (270.0) degrees
          • Unit - Turn collision for (Last created unit) Off
          • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Move To temp_point_array[1]
          • Unit - Create 1 dummy unit (GatePathUpdater) for (Owner of (Triggering unit)) at temp_point facing Default camera rotation (90) degrees
          • Unit - Turn collision for (Last created unit) Off
          • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Move To temp_point_array[2]
          • Custom script: call RemoveLocation(udg_temp_point)
          • Custom script: call RemoveLocation(udg_temp_point_array[1])
          • Custom script: call RemoveLocation(udg_temp_point_array[2])
        • Else - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of GateState (closed) for (Triggering unit)) Equal to (==) 1
            • Then - Actions
              • Animation - Play (Triggering unit)'s stand animation
            • Else - Actions

So just make sure to play the corresponding animation (stand = closed / stand alternate = open) after morphing.

However:

With morphing a little annyoing bug of units persists, where their pathchecking is not updated, meaning that freshly trained units will not travel through a newly opened gate, it is still closed in their logic.
- anyone knows a fix for that?


I just found a fix, shown in triggers, by spawning two dummy units, running through the gate.
GatePathUpdater is just a dummy model (Vexorians dummy model) without any abilities (locust will not update the pathing). Just reduce its selection scale to 0 and no one should notice anything.

This took longer than expected.

Also i suggest making a vertical version.

edit: might be less troublesome to use Freyky's version, which will update the pathing just fine
 
Last edited:
Level 11
Joined
Mar 31, 2016
Messages
657
In order to play the right unit animation, i am using this fix:

  • FrontierGateAnim
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • Multiple ConditionsOr - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to (==) Gate Control (FrontierGate)
          • (Ability being cast) Equal to (==) Gate Control (FrontierGate)2
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of GateState (open) for (Triggering unit)) Equal to (==) 1
        • Then - Actions
          • Animation - Play (Triggering unit)'s stand alternate animation
          • -------- PathingUpdateFix --------
          • Set temp_point = (Position of (Triggering unit))
          • Set temp_point_array[1] = (temp_point offset by 250.00 towards 270.00 degrees)
          • Set temp_point_array[2] = (temp_point offset by 250.00 towards 90.00 degrees)
          • Unit - Create 1 dummy unit (GatePathUpdater) for (Owner of (Triggering unit)) at temp_point facing Default building facing (270.0) degrees
          • Unit - Turn collision for (Last created unit) Off
          • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Move To temp_point_array[1]
          • Unit - Create 1 dummy unit (GatePathUpdater) for (Owner of (Triggering unit)) at temp_point facing Default camera rotation (90) degrees
          • Unit - Turn collision for (Last created unit) Off
          • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Move To temp_point_array[2]
          • Custom script: call RemoveLocation(udg_temp_point)
          • Custom script: call RemoveLocation(udg_temp_point_array[1])
          • Custom script: call RemoveLocation(udg_temp_point_array[2])
        • Else - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of GateState (closed) for (Triggering unit)) Equal to (==) 1
            • Then - Actions
              • Animation - Play (Triggering unit)'s stand animation
            • Else - Actions

So just make sure to play the corresponding animation (stand = closed / stand alternate = open) after morphing.

However:

With morphing a little annyoing bug of units persists, where their pathchecking is not updated, meaning that freshly trained units will not travel through a newly opened gate, it is still closed in their logic.
- anyone knows a fix for that?


I just found a fix, shown in triggers, by spawning two dummy units, running through the gate.
GatePathUpdater is just a dummy model (Vexorians dummy model) without any abilities (locust will not update the pathing). Just reduce its selection scale to 0 and no one should notice anything.

This took longer than expected.

Also i suggest making a vertical version.

edit: might be less troublesome to use Freyky's version, which will update the pathing just fine

Nice - I actually got another one made for me by friendly people on the forums. It works 100% and has custom pathing too.
If you want to post it here, lemme know.
 
Level 21
Joined
Dec 4, 2007
Messages
1,473
What do you mean, another gate model? They are always useful, undoubtedly!

The vertical version of this one is really missing too.
 
Level 11
Joined
Mar 31, 2016
Messages
657
What do you mean, another gate model? They are always useful, undoubtedly!

The vertical version of this one is really missing too.

No - another trigger for this gate model. Its a bit longer than yours however it has everything from custom pathing to open/close abilities.
I made a vertical version however the animations don't work properly. Twas just a simple rotation edit - still gotta rotate the bones or something
 
Top