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.
[05:47 pm]
Ultraviolet -- zsnakezz
zsnakezz shouted: ultra you have any thought or notes on undead invasion?
I still haven't gotten a chance to play it yet unfortunately. I just downloaded, but today I'm working on a project with a deadline so won't be able to play it today
[04:59 am]
zsnakezz -- >:)
[04:59 am]
zsnakezz -- :)
[04:58 am]
zsnakezz -- somebody gets it
[04:58 am]
zsnakezz -- and its not all just numbers in my file screen
[04:57 am]
zsnakezz -- thank you for your comment though, good to know some people out there tried my map out
[04:57 am]
zsnakezz -- just kidding
[04:57 am]
zsnakezz -- ultra you have any thought or notes on undead invasion?
[2024-5-31. : 2:36 pm]
Wing Zero -- Bop em
[2024-5-31. : 2:36 pm]
Wing Zero -- Mods
Please log in to shout.


Members Online: Roy