Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Help with understanding Command the Most/Least At
Help with understanding Command the Most/Least At
Dec 20 2021, 4:15 am
By: Brusilov  

Dec 20 2021, 4:15 am Brusilov Post #1



In my map, I'm trying to manually trigger a rudimentary "AI". Basically, I want to set up a test whereby if the CPU outnumbers a human player (or the entire human force, if that's possible) in a given region, it'll order its units to attack the player at a specific location. However, if it notes that it's outnumbered by the player, it'll play defensively and order its units to move to an interior location (periodically with a preserve trigger, so that the player can't kite them). Easy, I thought; just make the trigger for the computer player, and use "Command the Most [Men] at [Region]" -> Attack, "Command the Least [Men] at [Region]" -> Move.

However, it won't actually work. I've tried also adding in Force 1 and the Player 1 under the triggers with no dice. No matter whether the AI is outnumbered or much larger than me, it just keeps attacking as if it commands the most. Is there something about the way this condition is structured that I'm missing?



None.

Dec 20 2021, 6:09 am DarkenedFantasies Post #2

Roy's Secret Service

The condition compares all players on the map, not only the players in a given location. So if for example you have a location over a player's base and want to order the CPU's units to move away if it commands the least men in that location, the first player (starting with player 1) that doesn't have any units in that location will be considered as having the least and the trigger (presumably owned by the CPU player) won't fire for ordering the CPU's units away.




Dec 21 2021, 12:24 am Brusilov Post #3



The condition compares all players on the map, not only the players in a given location. So if for example you have a location over a player's base and want to order the CPU's units to move away if it commands the least men in that location, the first player (starting with player 1) that doesn't have any units in that location will be considered as having the least and the trigger (presumably owned by the CPU player) won't fire for ordering the CPU's units away.

Thanks. That makes sense. That's kind of a pain in the butt that you can't specify a range of players, but I figure I could get around this by only taking advantage of the "Commands the Most At" condition; so, for example, if I execute the "Commands Most At" condition for Player 1, but then have the trigger order Player 8's (or "Foes") units instead, it would essentially be the same as if I could get it to work for "Player 8 Commands the Least At," no?

Of course, I'll then run into trouble if Player 1 and 2 are both fighting Computer Player 8, and Player 8 acts too aggressively because the triggers will limit me to calculating behavior based only on its relation to each individual player.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
[2024-4-17. : 1:52 am]
Vrael -- hah do you think I was born yesterday?
[2024-4-17. : 1:08 am]
O)FaRTy1billion[MM] -- i'll trade you mineral counts
[2024-4-16. : 5:05 pm]
Vrael -- Its simple, just send all minerals to Vrael until you have 0 minerals then your account is gone
[2024-4-16. : 4:31 pm]
Zoan -- where's the option to delete my account
[2024-4-16. : 4:30 pm]
Zoan -- goodbye forever
Please log in to shout.


Members Online: RexyRex