Hi,
I have one npc type with a "function" instance variable. This variable consist a basic "idle" value. I have six in this npc type.
I can change their instance variable one by one if I want. So, if I change 4 units inst vari instead of idle to woodcutting I remain 2 npc with idle and 4 with woodcutting inst vari.
Now, I want to counting that how many woodcutter units I have at this moment and write in a global variable.
I don't know how should I do this because I need a number to "set global vari", but have no any number except the 6 npc. How can I count how many woodcutters and idle units I have?
I tried this method:
Conditions:
- Every thick
- Pick nth instance >>> Object: NPC >>> Instance: npc.Function = "woodcutting"
Actions:
- Set global variable >>> ??????
Thank you!