Thank you for your answer! With your help I could to do it. I tried the "for each" but it didn't work properly in my situation, but therefore I learned the properly use of compare instance function. So, the solution very easy now:
Conditions:
- On left button clicked on Builder decrease icon (minus button)
- NPC Compare instance variable: NPC; "function" equal to "builder"
- Pick a random NPC instance
Action:
- NPC Instance variable: Set value "function" to "idle"
Finish. Now when I want to reduce only the amount of Builders (or other units) I can do it perfectly.
Previously, my problem was that when I want to reduce this ones, not just the type of selected units amount were decreasing (now: Builders) instead, the other ones as well (for example: Woodcutters amount too).
Anyway, now working properly!