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.
[06: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.
[06: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
[06: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?
[06:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[06:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
[06:48 pm]
Vrael -- Perhaps that utilizes cutting-edge technology and eco-friendly cleaning products?
[06:47 pm]
Vrael -- Do you know anyone with a deep understanding of the unique characteristics of your carpets, ensuring they receive the specialized care they deserve?
[06:45 pm]
NudeRaider -- Vrael
Vrael shouted: I've also recently becoming interested in Carpet Cleaning, but I'd like to find someone with a reputation for unparalleled quality and attention to detail.
beats me, but I'd make sure to pick the epitome of excellence and nothing less.
[06:41 pm]
Vrael -- It seems like I may need Introductions to multiple companies for the Topics that I care deeply about, even as early as Today, 6:03 am.
[06:38 pm]
Vrael -- I need a go-to solution and someone who understands that Carpets are more than just decorative elements in my home.
Please log in to shout.


Members Online: Roy