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.
[2026-1-20. : 1:46 am]
Daniel_Evan -- please try my newest map.
[2026-1-16. : 8:15 am]
IlyaSnopchenko -- That's a good one
[2026-1-16. : 1:19 am]
Ultraviolet -- only spammers are allowed to modify the wiki, so ya need a new account
[2026-1-15. : 4:58 pm]
IlyaSnopchenko -- tho I need a separate account, do I?
[2026-1-14. : 9:12 pm]
IlyaSnopchenko -- I see :)
[2026-1-14. : 3:47 pm]
NudeRaider -- IlyaSnopchenko
IlyaSnopchenko shouted: Is it possible to add articles to wiki? Inc. those that got posted to "staredit-network.fandom" while the wiki here was ailing?
if the spammers can do it IlyaSnopchenko
IlyaSnopchenko shouted: It also looks like the wiki was filled with spam
what could stop you? :awesome:
[2026-1-14. : 12:49 pm]
IlyaSnopchenko -- It also looks like the wiki was filled with spam
[2026-1-14. : 12:46 pm]
IlyaSnopchenko -- Is it possible to add articles to wiki? Inc. those that got posted to "staredit-network.fandom" while the wiki here was ailing?
[2026-1-14. : 7:07 am]
NudeRaider -- Moose
Moose shouted: Ultraviolet resurrected NudeRaider now you can Ultraviolet not anymore
and I just did :) https://staredit.net/topic/18839/unread/#special
[2026-1-11. : 10:54 pm]
Ultraviolet -- Moose
Moose shouted: how about if I have a stroke you don't tell me what to do
:lol:
Please log in to shout.


Members Online: Moose