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

Need help changing unit's movement type

Status
Not open for further replies.
Level 2
Joined
Nov 2, 2010
Messages
4
Hello everyone,

I need help changing the movement type of a unit from foot to flying and vice-cersa. I haven't seen anything like "Unit - Change movement type" in the Actions list of the trigger editor.

The purpose of this is to make a unit go through obstacles when I order the unit to move to a point through triggers.

I have tried using the Unit - Turn Collision On/Off, but even though the unit will go through obstacles if I mannualy order it to, it will go aroung them if I order through triggers. After finding this out, I figured changing the unit's movement type would be the best solution.

I have also tried to do it by using a morph spell, and setting the Normal Form Unit to the unit whose movement type I want to change, and the Alternate Form Unit to a copy of it, but with a different movement type. This caused a fatal error when testing the map.

I am unsure if this can be done with Custom Scripts, as I lack any JASS skills.
 
Level 18
Joined
Mar 7, 2005
Messages
824
I think the common way would be replacing the units..

Just create two units, one with flying as movement type and the other normal as foot.
And then replace the units with each other, should work without problems..

I also don't think there's some trigger for changing movement types.. I've never seen some..
 
Level 15
Joined
Oct 16, 2010
Messages
941
Alternatively you could add the crow form ability to the unit using the [Unit - Add Ability] function. That will make it flying (you'd have to set it's flying height manually using the [Animation - Set Unit Flying Height] function)
 
Level 8
Joined
Oct 31, 2010
Messages
238
Alternatively you could add the crow form ability to the unit using the [Unit - Add Ability] function. That will make it flying (you'd have to set it's flying height manually using the [Animation - Set Unit Flying Height] function)

About that... If it lasts more than a second.. Users may find it annoying to see that ability in their ability icon spaces.
 
Status
Not open for further replies.
Top