Im making a map where units spawn and automaticly attacks another player. (Units are not commandable).
The problem is that when they are given the order to attack a player that is not in a straight line from theyr spawn point they are cutting the corners as shown on the image below:
Any ideas on how to make that happen? Iv tried adding mid regions and/or pathing blockers, but that just makes the units go in a long line instead of one big army.
I added points between the bases and the units didnt cut the corners but instead when I had like 50 marines in one army they still end up forming a big line after one waypoint instead of moving as one big army :S
Well, A possibility, Depending on the the game is intended to work, Would be to order the group to the first point, when they all get there, as in are not moving, issue a group order to the second point, rinse and repeat.
maybe store their path in a variable, place regions around a point, make them move to the point, and have a trigger that detects when they enter the region issue an order to send them to the next point in their variable. They won't form a line this way since they never reach their waypoints because they get orders anytime they get close to the point.
Instead of regions maybe see if there's a "unit comes within range of point" event or something like that, I think there was one. This'll save you placing regions all over the damn place.
Yeah, Iv tried the Any Unit enters within x of Point and it didnt work well. Im testing with 50 marines that starts in one army, but as soon as they enter within the 1. Point, they start to scatter because the already new ordered marines are pushing the others so the others have to walk back etc.
What I havent tried is to store the created units in a unit group and re-order the entire Unit group or something. I just have to find a way to make the right unit group attack a new point since the spawn timer is at 20 seconds so there will be several unit groups on the map at the same time.
If you want them to be grouped up, you can place them all in a unit group, then use the trigger action "Wait until <all units in unit group> become idle". This will prevent them from continuing on the path until the whole group has reached the destination area.
Im making a map where units spawn and automaticly attacks another player. (Units are not commandable).
The problem is that when they are given the order to attack a player that is not in a straight line from theyr spawn point they are cutting the corners as shown on the image below:
http://imageshack.us/photo/my-images/822/map0506.jpg
What I want is the units to walk in straight lines as shown in the image below:
http://imageshack.us/photo/my-images/820/map0507.jpg/|Example2
Any ideas on how to make that happen? Iv tried adding mid regions and/or pathing blockers, but that just makes the units go in a long line instead of one big army.
@Norvegia: Go
Add additional points that they have to go to, issue order, after existing orders.
@grenegg: Go
Of course, didnt thought of that. Thanks mate, Il try that.
Hmm, didnt work as well as I thought.
I added points between the bases and the units didnt cut the corners but instead when I had like 50 marines in one army they still end up forming a big line after one waypoint instead of moving as one big army :S
Well, A possibility, Depending on the the game is intended to work, Would be to order the group to the first point, when they all get there, as in are not moving, issue a group order to the second point, rinse and repeat.
maybe store their path in a variable, place regions around a point, make them move to the point, and have a trigger that detects when they enter the region issue an order to send them to the next point in their variable. They won't form a line this way since they never reach their waypoints because they get orders anytime they get close to the point.
Instead of regions maybe see if there's a "unit comes within range of point" event or something like that, I think there was one. This'll save you placing regions all over the damn place.
@TheAlmaity: Go
Yeah, Iv tried the Any Unit enters within x of Point and it didnt work well. Im testing with 50 marines that starts in one army, but as soon as they enter within the 1. Point, they start to scatter because the already new ordered marines are pushing the others so the others have to walk back etc.
What I havent tried is to store the created units in a unit group and re-order the entire Unit group or something. I just have to find a way to make the right unit group attack a new point since the spawn timer is at 20 seconds so there will be several unit groups on the map at the same time.
@Norvegia: Go
you could offset where you order them to by how far they are from the center of the group...
errr.... I can explain it here:
@Norvegia: Go
If you want them to be grouped up, you can place them all in a unit group, then use the trigger action "Wait until <all units in unit group> become idle". This will prevent them from continuing on the path until the whole group has reached the destination area.
@Chiquihuite: Go
further on the unit group.
when one unit reaches the point issue a the new order entirely to the entire unit group so they all change direction from there