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

[JASS] Straight line

Status
Not open for further replies.

Zwiebelchen

Hosted Project GR
Level 35
Joined
Sep 17, 2009
Messages
7,236
Units usually take the shortest path to the order target. If they don't walk in a straight line, then there's another object with collision blocking the direct path.

Solution: Use flying movement type.

Just a thing to consider, as it might be the cause of your problem:
- Deactivating pathing by SetUnitPathing(unit, false) causes erratic movement behaviour, as the pathing AI was not made for that. Placing fences, for example, will sometimes make your unit move around them and sometimes walking over them directly. I recommend not using this function.
- Air only pathing blockers can cause erratic movement behaviour of ground units.
 

Zwiebelchen

Hosted Project GR
Level 35
Joined
Sep 17, 2009
Messages
7,236
I've always had a problem setting them to float doesn't allow them to move at all. They just sit we're u spawn them. Also using flying would not help at all since it is a maze map setting all units to flying would ruin the purpose of a maze map
Then I suppose what you are trying to achieve is impossible.
If you want units to ignore collision, you need to make them flying units.

Whats the problem with units trying to walk around obstacles in your map? If they are not supposed to run around obstacles, what is the problem with flying pathing?

I'm confused about what you are trying to achieve. Do you want collision or not? o_O
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
Then I suppose what you are trying to achieve is impossible.
If you want units to ignore collision, you need to make them flying units.

Whats the problem with units trying to walk around obstacles in your map? If they are not supposed to run around obstacles, what is the problem with flying pathing?

I'm confused about what you are trying to achieve. Do you want collision or not? o_O

I think he means the fact that ground units never move in a straight line, even if there are no obstacles.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
ya i might have to i was hoping for the other way tho so it would be nice for my td portion. but if i have to use setunitx/y i guess ill have to i just try to stay away from periodic timers of less than 1.0 lol. although using setunitx/y with the periodic timer will make it so i could increase the speed of the ball tht is moving as the game goes on for harder difficulty.

edit: looks like im gonna have to change it to .03 timer i used lightning to show the straight line tht the unit is supposed to follow and wow it is way off lol. i thouhgt it looked funny b4 but whatever lol. timer to redo some of the game lol

edit2: still looking for an easy way to do it with the normal issuepointorder one. thx to all for helping

edit3: i put in the .03 timer and it works great thx only need a few more things and this minigame will be done.
 
Last edited:
Status
Not open for further replies.
Top