Hi, I'm extremely new to the SCII scripting/modding, so the question is probably somewhat dumb, but I couldn't figure this out.
What I need is to attach a custom variable to some units, pretty much like another life/shields/energy thing, just my own. Hopefully this is possible to do with a script for a number of existing unit types at once, e.g. for all structures or something like that?
OK , I figured out the way to do it via the data table, not too pretty but simple enough - concatenating UnitTag with some arbitrary property name yields a key for the table.
As for the UI, TextTag attached to the unit will do for now:)
Also I just realized that I probably shoud've posted this in "Triggers", sorry for that:/
There are functions to set and get custom values for a unit. A custom value is a real (fixed in Galaxy) type. I have no idea about limitations of this approach but at least a few custom value indices are supported per unit.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi, I'm extremely new to the SCII scripting/modding, so the question is probably somewhat dumb, but I couldn't figure this out.
What I need is to attach a custom variable to some units, pretty much like another life/shields/energy thing, just my own.
Hopefully this is possible to do with a script for a number of existing unit types at once, e.g. for all structures or something like that?
Thaks a lot!
You can add custom UI to units but you probably will need to handle the extra status with triggers.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
OK , I figured out the way to do it via the data table, not too pretty but simple enough - concatenating UnitTag with some arbitrary property name yields a key for the table.
As for the UI, TextTag attached to the unit will do for now:)
Also I just realized that I probably shoud've posted this in "Triggers", sorry for that:/
There are functions to set and get custom values for a unit. A custom value is a real (fixed in Galaxy) type. I have no idea about limitations of this approach but at least a few custom value indices are supported per unit.