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.
[06:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
[2024-4-20. : 8:09 pm]
Vrael -- woo baby talk about a time crunch
[2024-4-20. : 8:08 pm]
Vrael -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
so that gives me approximately 27 more years to finish tenebrous before you get to it?
[2024-4-20. : 7:56 pm]
Oh_Man -- lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
Please log in to shout.


Members Online: Roy, momonetj48, 3miac581ha7, lil-Inferno, Dem0n, C(a)HeK