Hi!
Is it actually possible to attach variables to units in the Data Editor? For instance I need EACH Zergling to have (say) an integer variable attached to them, that I can manipulate in the trigger editor. Is that possible? Or do I need to create an array of integers and assign each Zergling an index in that array?
So if a zergling was built on the map it already has it's own integer variable (say cash in its wallet :)) and I can manipulate it - that's the goal.
Each unit can have multiple "custom attributes" or custom values, don't quite remember the exact wording.
Just select "unit" in the trigger editor action listing and then type "custom" into the search bar und you'll have it.
I'd also recommend using constants or variables as indices so you always know which index is related to each given purpose.
Hi! Is it actually possible to attach variables to units in the Data Editor? For instance I need EACH Zergling to have (say) an integer variable attached to them, that I can manipulate in the trigger editor. Is that possible? Or do I need to create an array of integers and assign each Zergling an index in that array?
So if a zergling was built on the map it already has it's own integer variable (say cash in its wallet :)) and I can manipulate it - that's the goal.
Each unit can have multiple "custom attributes" or custom values, don't quite remember the exact wording.
Just select "unit" in the trigger editor action listing and then type "custom" into the search bar und you'll have it.
I'd also recommend using constants or variables as indices so you always know which index is related to each given purpose.
Ty that helped.
Event: Any unit enters map
Condition: Unit type of unit == Zergling
Action: Add triggering unit to (unit group)
Something like that? It might lag a bit if you create a load of them, but it should work...
EDIT: If you want to reference to a specific zergling, it'll be a little more complicated.