Staredit Network > Forums > SC2 Assistance > Topic: idle unit conditions
idle unit conditions
Mar 25 2011, 1:09 am
By: Bolshevik09  

Mar 25 2011, 1:09 am Bolshevik09 Post #1



Ok so we have 2 marines for a computer player, Unit A & B.
Unit A is preplaced before the starting of the map
Unit B is preplaced as well, but has already finished a 'Move' order.
Both Units are idle.... but only Unit B has 'become idle'

How do you create a trigger that can detect only unit A as in. "is idle" but hasnt "become idle"??
i can detect when Unit B becomes idle but cant detect Unit A, because it "is idle" but never had a pre-order to beforehand

(My theory): If i can detect unit A, i can simply issue it a "hold position" then a "stop", which will make the unit idle... which there is a event that can detect that, but i still need a condition for this. If Blizzard adds a condition "unit is idle" (IS could be changeable to WAS, IS or BECAME)
then this would be possible....

Note-
-The condition "idle units for player," doesnt detect units that are preplaced or if you "change ownership of unit"
-dont know how to detect units that have ownership changed.



None.

Mar 25 2011, 1:23 am Ahli Post #2

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

The Event detects that a unit goes into the idle status (= finishing an order; I don't know about spawning without rally point or trigger created).

Events will never detect a specific status, only actions that change stuff.

So you can track all idle units, if you track the functions that change the amount of these units.
You already stated some ways that can change the amount of idle units for a player without having the unit finishing/dropping an order (that's what the event detects).




Mar 25 2011, 3:59 am Bolshevik09 Post #3



Quote from Ahli
So you can track all idle units, if you track the functions that change the amount of these units.

give examples on this

Quote from Ahli
You already stated some ways that can change the amount of idle units for a player without having the unit finishing/dropping an order (that's what the event detects).
if you change ownership of unit, the unit is considered idle, but still hasnt "become idle". You would have to issue it an order to briefly complete.
Also same for created units as well...



None.

Mar 25 2011, 11:09 am Ahli Post #4

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

Quote from Bolshevik09
Quote from Ahli
So you can track all idle units, if you track the functions that change the amount of these units.
give examples on this

- have a unit group variable that contains all idle units (from map or player)
- at map start, throw in all units into that group or order every unit to do something like moving onto their position (see next point)
- "unit becomes idle" -> add
- "unit stops being idle" -> remove
- unit enters entire map -> add (maybe only, I don't know how trained units behave if they have rally points; so check their order)
- unit owner changes -> add (check their order) / remove (if you track all owner's units, ignore)
- unit dies -> remove

But maybe there is a better way to achieve what you would like to achieve with this because I've no idea why you want to track idle units.




Mar 25 2011, 12:58 pm TF- Post #5

🤙🏾

Just use the "Unit Order Count" comparison as a condition, the event can be anything.
If the unit's order count is zero then the unit is idle (command card shows Stop highlighted), anything other than Stop counts as 1 order.



🤙🏾

Mar 25 2011, 9:33 pm Bolshevik09 Post #6



Quote from Ahli
I've no idea why you want to track idle units.
Sneak peak: Sneaking mission! Units that "see you" become player 8.. After they "loose sight" or terminate the "intruder", they go back to player 7.
If they turn into player 8 but don't pursue the "intruder," they are idle but don't become idle...

Quote from TF-
Just use the "Unit Order Count" comparison as a condition, the event can be anything.
If the unit's order count is zero then the unit is idle (command card shows Stop highlighted), anything other than Stop counts as 1 order.
This might work, i'l report back.

Also i was thinking of periodically issuing every player 8 unit a "Hold position" and "Stop" Order after existing orders complete. We'll see



None.

Apr 1 2011, 4:09 am FatalException Post #7



I advocate Ahli's method. If you know when units should be counted as idle but won't return true on the "unit becomes idle" event, just check for the events that cause them to become idle without tripping the "unit becomes idle" event as well (in your case, that may be looking for a player gaining a unit, and possibly using the unit order count condition if you think you need to).



None.

Apr 1 2011, 8:14 am Ahli Post #8

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

If I would need the idle units often, I would use mine.
If I would need them rarely, I would do TF-'s solution.




Apr 2 2011, 9:52 am Ahli Post #9

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

I would like to add that I just saw that there is an unit group action that returns a unit group with all idle units of a player.
-> so you could just use that




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:19 pm]
Vrael -- IM GONNA MANUFACTURE SOME SPORTBALL EQUIPMENT WHERE THE SUN DONT SHINE BOY
[2024-5-02. : 1:35 am]
Ultraviolet -- Vrael
Vrael shouted: NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
Gonna put deez sportballs in your mouth
[2024-5-01. : 1:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
[2024-4-30. : 7:43 am]
NudeRaider -- Vrael
Vrael shouted: if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Yeah I'm not a big fan of Westernhagen either, Fanta vier much better! But they didn't drop the lyrics that fit the situation. Farty: Ich bin wieder hier; nobody: in meinem Revier; Me: war nie wirklich weg
[2024-4-29. : 6:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[2024-4-29. : 4:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[2024-4-29. : 12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[2024-4-29. : 11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
Please log in to shout.


Members Online: Zycorax, Moose