Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Distinct Order Commands on Clumped Units
Distinct Order Commands on Clumped Units
Oct 4 2009, 2:14 am
By: Cinolt  

Oct 4 2009, 2:14 am Cinolt Post #1



I have about sixteen scouts ordered to move in one spot for about five seconds, but then I want one scout to go to Location 1, another scout to Location 2, another scout to Location 3 etc. The order command orders all units in one location, so I was wondering if there was a possible way to do what I described. Any help is appreciated.



None.

Oct 4 2009, 2:17 am Kaias Post #2



Quote from name:yoonkwun
I have about sixteen scouts ordered to move in one spot for about five seconds, but then I want one scout to go to Location 1, another scout to Location 2, another scout to Location 3 etc. The order command orders all units in one location, so I was wondering if there was a possible way to do what I described. Any help is appreciated.
Order them to location 1, give one away to Neutral
Order them to location 2, give one away to Neutral
Order them to location 3... etc
Until there aren't any left, then give them all back. This should be done in that order in one loop.



None.

Oct 4 2009, 2:24 am Cinolt Post #3



I thought of something like that myself, but it appears that if I give the unit after it's ordered in the same trigger cycle, for some reason the order is canceled, proven in this test map. I might be doing something wrong, in which case I would appreciate it being pointed out

Attachments:
test.scm
Hits: 1 Size: 48.03kb



None.

Oct 4 2009, 2:46 am Kaias Post #4



I'm not sure if this is acceptable to you, but it is at least one solution. You could also give to different Neutral players, order those, and give back a bit after



None.

Oct 4 2009, 2:51 am Cinolt Post #5



Sorry, I don't want that visual effect. And in my real map I have 16 scouts, so I don't think giving each to a different player will work.

If anyone knows a method of doing what I described above please reply

- or -

a method of making multiple units in one spot order outwards in a circle, I was maybe thinking an AI Script. It's used in maps such as Missile Warfare and Shrapnel CTF.



None.

Oct 4 2009, 5:54 am NudeRaider Post #6

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 name:yoonkwun
I thought of something like that myself, but it appears that if I give the unit after it's ordered in the same trigger cycle, for some reason the order is canceled, proven in this test map. I might be doing something wrong, in which case I would appreciate it being pointed out
That is correct. The solution is simple:
Order Scouts at Location 'Scouts' to Loc 1
Wait(0)
Give 1 Scout at 'Scouts' to Neutral
Order Scouts at Location 'Scouts' to Loc 2
Wait(0)
Give 1 Scout at 'Scouts' 1 to Neutral
...etc until you ordered all 16 scouts.
Give all Scouts at 'Scouts' back to Current Player (or whoever owned them before)

This will take 2 game seconds for 16 scouts. (A wait(0) is continued 1 trigger loop (or 84ms respectively) later.)
Make sure the player running the trigger is not executing a wait the same time, or you will run into wait blocks.
Also make sure the location 'Scouts' is big enough, so none of the scouts escapes it before the last give action fires.
If that's not possible there's a similar way, but it requires an extra player:
First give all Scouts to P12.
--- Repeat start
Then give 1 Scout to P11 and order it, wait 0ms and give it to the original player
--- Repeat end

Quote from name:yoonkwun
a method of making multiple units in one spot order outwards in a circle, I was maybe thinking an AI Script. It's used in maps such as Missile Warfare and Shrapnel CTF.
The junkyard dog ai does this. Works best in the middle of the map.




Oct 4 2009, 6:01 am Vrael Post #7



Heres a solution I think:

1). Give 16 Scout at Inital Location from "Starting Player" to Neutral

2). Center Location "Very Small" on Scout owned by Neutral at Initial Location
3). Give 1 Scout at location "Very Small" to "Starting Player"
4). Order Scout owned by "Starting Player" at "Very Small" to "Destination Location"

repeat 2-4 16 times.

Only thing that could mess up is if the scouts stack, then it might order the same one two or three times accidentally.



None.

Oct 4 2009, 6:22 am NudeRaider Post #8

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 Vrael
Only thing that could mess up is if the scouts stack, then it might order the same one two or three times accidentally.
Right, and that's exactly the reason why he should go for something else. Scouts are air units after all...




Oct 4 2009, 1:56 pm Cinolt Post #9



Thanks all, I found the giving it to P11 method works best. It's a shame the junkyard dog AI doesn't work on neutral players. For anyone interested:

Attachments:
test3.scm
Hits: 1 Size: 48.85kb



None.

Oct 4 2009, 3:13 pm NudeRaider Post #10

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

So the units you're ordering around are neutral?
Thought they were computer controlled enemies or something. Then you could have just executed the JYD script on them.




Oct 4 2009, 11:41 pm Cinolt Post #11



Yeah, I was forced to make them neutral, because if they're computers and I order them, they tend to move on their own will. A bit off topic, but does anybody know if there's a way to make computers act like neutral players? An AI script maybe?



None.

Oct 4 2009, 11:59 pm NudeRaider Post #12

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

Computer units only move on their own if the computer runs a melee ai and the units have no order.

There's an ai script that sets computers to rescueable.




Oct 5 2009, 12:01 am Kaias Post #13



Quote from NudeRaider
Computer units only move on their own if the computer runs a melee ai and the units have no order.

There's an ai script that sets computers to rescueable.
Or if they have someone to attack..



None.

Oct 5 2009, 12:06 am Vrael Post #14



Quote from NudeRaider
Quote from Vrael
Only thing that could mess up is if the scouts stack, then it might order the same one two or three times accidentally.
Right, and that's exactly the reason why he should go for something else. Scouts are air units after all...
Well yeah, but if he does something like

Create 16 Scout for Player X at Location Y

Then immediately issues orders, they won't be stacked, it's still a useful application in the correct circumstances. Assuming he uses a very very small location for the "Very Small" location in the method above. Maybe just a 1 pixel location even.



None.

Oct 5 2009, 12:24 am Cinolt Post #15



This test map uses this method for distinct orders:

Quote from NudeRaider
First give all Scouts to P12.
--- Repeat start
Then give 1 Scout to P11 and order it, wait 0ms and give it to the original player
--- Repeat end

And it makes the scouts order to their correct spots for about a second, but then they move back to their original spot. I made another test map without the give actions and they moved fine, so I'm guessing that's what is screwing with the AI. Oh well. This doesn't happen with neutral players.

Attachments:
test4.scm
Hits: 0 Size: 48.1kb



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[2024-4-27. : 3: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?
Please log in to shout.


Members Online: UndeadStar, Excalibur