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

Adding new movement types.

Status
Not open for further replies.
Level 28
Joined
Apr 6, 2010
Messages
3,107
Is it possible to add new movement types in the Object Editor (like an anti-float movement type that prevents going in any water)?

Specifically, allowing for a unit that can only move in deep water/dry land (and not shallow water)/shallow water without the use of triggers or pathing blockers.

And if the Submerge spell only works in deep water, is it possible to create an equivalent spell that only works on land (and not shallow water)? I looked at the Submerge and Burrow spells and there's no "only on water/land" condition box.
 
Level 21
Joined
Mar 29, 2020
Messages
1,237
I don't think that is possible without triggering.

with triggering you can create your own index system that is applied on each minion upon creation via custom value, and have knockbacks block units from going in terrain you don't want them in. (I created a similar system once...).

in terms of submerge - you can create a custom spell that when casted - checks what type of terrain the unit is on and either 1.activates a hidden burrow ability 2. activates a hidden submerge ability or 3. - if the unit is in shallow water - shows an error message to the caster that the ability can not be cast in shallow water.
 
Level 21
Joined
Mar 29, 2020
Messages
1,237
check the walkability and buildability of the terrain. can explain more but not right now...

Edit:

there is actually an even better way -> by cross referencing "boolean - enviroment" type comparisons you can check for deep or shallow water. if floatability is on and walkability is off -it's deep water, if both are on - it's shallow water.

here's a little demo I made just to make sure it worked (it does...)
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) Presses the Up Arrow key
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Terrain pathing at (Position of Gryphon Rider 0000 <gen>) of type Walkability is off) Equal to True
          • (Terrain pathing at (Position of Gryphon Rider 0000 <gen>) of type Floatability is off) Equal to False
        • Then - Actions
          • Game - Display to (All players) the text: deep water
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Terrain pathing at (Position of Gryphon Rider 0000 <gen>) of type Walkability is off) Equal to False
              • (Terrain pathing at (Position of Gryphon Rider 0000 <gen>) of type Floatability is off) Equal to False
            • Then - Actions
              • Game - Display to (All players) the text: shallow water
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Terrain pathing at (Position of Gryphon Rider 0000 <gen>) of type Walkability is off) Equal to False
                  • (Terrain pathing at (Position of Gryphon Rider 0000 <gen>) of type Floatability is off) Equal to True
                • Then - Actions
                  • Game - Display to (All players) the text: land ho!
                • Else - Actions
 
Last edited:
Status
Not open for further replies.
Top