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.
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.
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:
None.
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.
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.
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
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
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.
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.
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
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...
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:
None.
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.
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.
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.
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.
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.
This test map uses this method for distinct orders:
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:
None.