- Joined
- Aug 6, 2014
- Messages
- 1,126
How can I disable the auto movement of a unit when I select a point for it to go. I want the unit to go straight to the point and does not try to avoid obstacles like the ordinary war3 does.
^The title doesn't conretly describe your problem.Level 10 trigger challenge!
Turning is no problem.I mean like the unit will turn to the point
Walking is impossible with normal movement as it's only logical that the unit avoids unpassbale points.I want it the unit to go to the point like a dumb guy.
Program another, older game. I believe StarCraft I had that behaviour. All modern games have sophisticated path finders built in to find short routes to the target point. Even Diablo III will try to route your hero around doors and other obstacles if encountered.How can I disable the auto movement of a unit when I select a point for it to go. I want the unit to go straight to the point and does not try to avoid obstacles like the ordinary war3 does.
Do you want the unit to face the point or face the point and then move to it?
Program another, older game. I believe StarCraft I had that behaviour. All modern games have sophisticated path finders built in to find short routes to the target point. Even Diablo III will try to route your hero around doors and other obstacles if encountered.
StarCraft II can achieve this behaviour using Air movement. Air movement lacks path finder logic (straight line movement) so will not route around air pathing blockers. That said air pathing blockers are different from ground pathing (they use spheres) so it has other limiations.
As far as I know WC3 does not allow for this since Air, Ground and Water pathing all works the same and will route around obstacles as best as possible.
If all you want is for a unit to face a point then use highschool mathematics to determine the angle towards the point and order the unit to rotate that direction. You could then use a movement system (eg those used for projectiles) to move the unit straight in that direction at an average speed of the unit's current speed. This would completely bypass the normal movement system, ignore pathing and consume more resources. The system point of entry would be when a move order is issued to the unit, at which time it gets discarded and the unit is then handled by the system.