Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Air units patrol
Air units patrol
Nov 9 2007, 7:44 pm
By: NudeRaider  

Nov 9 2007, 7:44 pm NudeRaider Post #1

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

In the map I'm working on there are computer controlled air units following a given patrol route. They are to attack every enemy that comes into range.

The principle works fine, but I do not order them every trigger loop because the attack would become choppy since I'm using hypertriggers. So now it sometimes happens that the first 3 units of a group of 6 enter the waypoint and are ordered to the next, but the last 3 come right after the order and thus patrol back the path until the next order thus weakening the group.

I understand this can be improved by bigger waypoints or shorter delays between the orders. But both have disadvantages: shorter delay -> choppier battles; bigger locations -> edges of the given path are cut off

So is there a way to completely avoid the mentioned (red) drawbacks or do I have to live with balancing it until all requirements are adequately met?




Nov 10 2007, 12:45 am Oyen Post #2



Let me try to figure out what you are saying. There are 6 air units that patrol to a location. 3 of them reach the location earlier than the other 3, the last 3 miss it and patrol back before the order happens again.

Are the air units invincible? If so, you could add a trigger for each waypoint that makes each air unit stop when reaching the waypoint. Then you could add a condition for the regular waypoint order trigger that only issues the order if ALL 6 are in the location.



None.

Nov 10 2007, 1:46 am NudeRaider Post #3

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

6 units, 3 lagging behind was only an example. There are any number of units, different types and they can spawn at any place on the map, fly to the nearest waypoint (possibly join up with other units there) and from there follow the path until its end.

And they are not invincible (which doesn't make any difference anyways)




Nov 10 2007, 3:57 am frazz Post #4



I might be missing something, but it seems to me that you could just switch from patrol to attack since that's basically what it's doing.



None.

Nov 10 2007, 4:04 am NudeRaider Post #5

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

The point is comp units on attack order ignore enemies until being fired upon. Thats why I need to use patrol.




Nov 10 2007, 4:26 am frazz Post #6



IC. You could make a system that detects when a new unit enters the location, then give the patrol order to all units in it.



None.

Nov 10 2007, 4:44 am NudeRaider Post #7

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Thats what I'm doing (sort of). But with delay. If I ordered them constantly while within that location battles would be choppy there.


EDIT: The problem is that they can be anywhere on the map and are ordered to the nearest waypoint...

But you made me find new ideas... to complex to explain now... I'll experiment first and post if I found something useful.

Post has been edited 1 time(s), last time on Nov 10 2007, 4:56 am by NudeRaider.




Nov 10 2007, 4:50 am Roy Post #8

An artist's depiction of an Extended Unit Death

Quote from Oyen
Let me try to figure out what you are saying. There are 6 air units that patrol to a location. 3 of them reach the location earlier than the other 3, the last 3 miss it and patrol back before the order happens again.

Are the air units invincible? If so, you could add a trigger for each waypoint that makes each air unit stop when reaching the waypoint. Then you could add a condition for the regular waypoint order trigger that only issues the order if ALL 6 are in the location.

That's what I was thinking. But if you can't use a numerical check, you could say, put a location in the path right before the location (If I need to elaborate this just give the word). Therefore you could order them to patrol to their next destination if no unit is in the location prior to the waypoint location




Nov 10 2007, 5:09 am NudeRaider Post #9

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from Roy
That's what I was thinking. But if you can't use a numerical check, you could say, put a location in the path right before the location (If I need to elaborate this just give the word). Therefore you could order them to patrol to their next destination if no unit is in the location prior to the waypoint location
Oh, don't focus your efforts too much on forming groups. I'd like to have all units follow the path and fight with as few interruptions as possible. Even if there IS a unit a few cm behind, the first shouldn't wait for it, but also the 2nd should not fly back - just follow the path without dertours.
If ALL units would fly an extra circle at the waypoint it would be ok (id it isn't avoidable).

Controlling where the units spawn is part of the game. So if you placed your spawns correctly they join up and form a (virtual) group, which is good.
On the other hand when you didn't place the spawns well the "penalty" should be that your units get killed 1 by 1.




Nov 11 2007, 5:57 am Hugel Post #10



I have an idea.

Try having a smaller waypoint location and less of a delay timer.
I'm thinking a 1x1 location and a 0 delay.
This will in effect make sure that they will NEVER go backwards in their patrol.
The location should also be small enough where they will move into it, out of it, and then be free to attack again without much stutter.

Downsides: If they are attacked when they leave the 1x1 location, they might be drawn back over the location and told to patrol again elsewhere.

I'm thinking less is more in this situation, if you don't want 50 air units converging on one single square,
you could distribute 3 or 4 small locations and direct them randomly to them.
This would require some testing to see how it works in practice.

Hugel



None.

Nov 11 2007, 11:17 am NudeRaider Post #11

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from Hugel
I have an idea.
[...]
Hugel
This was part of my idea too. But it wasnt enough. To understand that you would have to see the exact path relative to the gigantic locations that order the units from anywhere to the nearest waypoint.

Suffice to say that the waypoints are not at the edges of the gigantic locations (this has to be that way). Which means as soon as they leave the waypoint they are only in the gigantic location. It takes some seconds until they reach the next location. And when in that moment the order comes, they fly back.

The solution here were locations that are like rails. Since the paths are only horizontal and vertical (90° turns) I placed very slim loctions (0,5 x 15-20) between the waypoints. Directly after (in the trigger below) a unit gets the order from the gigantic location to fly back all units in the rails are ordered to the correct next waypoint, overwriting the previous wrong order within ms.

Could someone understand that? O.o Hard to explain it without a picture.
Well, however, thanks for your ideas, which helped me find the solution.

There is no need to spread units. The above system works fine even if 10 units reach the waypoint the same time.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[07:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[06:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[03:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[2024-4-26. : 6:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[2024-4-26. : 6:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[2024-4-26. : 6:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[2024-4-26. : 6:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
Please log in to shout.


Members Online: Roy