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

Issues with Float movement type

Status
Not open for further replies.

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,542
I'm working on a Tower Defense map and I'm having issues with movement/pathing.

So I'm currently using the Float movement type on my Monsters (the enemies that move along the path) because without it they will not walk in straight lines when going from one point to another. The issue there is that once these units reach the end of the path they're teleported into an arena where they'll fight like a standard unit. The problem here is that the Float movement type prevents them from moving towards enemies, they can still attack but not move. It's like they're stuck on Hold Position or something.

I'm really trying to avoid creating multiple Unit-Types of the same Unit. Here's what I've tried so far with no success.

I've tried changing their Movement Types via triggers:
Lua:
BlzSetUnitIntegerField(mc.unit, UNIT_IF_MOVE_TYPE, 1) -- 0 = none, 1 = foot, 2 = horse, 3 = fly, 4 = hover, 5 = float, 6 = amphibious
Of course this native doesn't work yet or I'm not using it properly.

I've tried Removing/Adding the Move ability from the unit in hopes that it might do something with no luck.

That's about it actually. Any ideas would be greatly appreciated!
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,542
Can the unit-type fields for reverse bear form morph be modified with the set_field natives? That could turn it into a code solution rather than an OE solution.
What do you mean exactly? What would the unit morph into?

Also, I found a solution by introducing more points along the Monster's path but it's still not ideal. It seems that the Foot movement type will move in a straight line as long as the distance between each point is very short, although part of me thinks that it's still not perfectly straight.
 
Status
Not open for further replies.
Top