I recently started using the SC2 editor and am now getting the hang of it fairly well.
I was wondering if it was possible to change a single units stat using triggers while not changing other same type units stats too.
Specifically whether I can make a mineral field using triggers and then set the mineral amount(Stats-Amount under Minerals behavior) to a random number and repeat to make multiple random amount mineral fields.
If anyone could help with this it would be great, Thank You. Alternatively, in data an event at creation to set it to a random number if able.
Thank you for your advice, I must of misunderstood catalogs as I thought they changed all units of that types stats. I will attempt to do that and if it doesn't work use a behavior as suggested above. I will post again if neither method works. Edit: I ended up creating multiple mineral field behaviors with different values for each, deleting the default and applying a random one of my new behaviors using a trigger.
Set Unit Property works for 1 or 2 of the stats that catalogs cannot change.
Rollback Post to RevisionRollBack
I am largely inactive, but I am still around. Feel free to poke me if you need some help, just be warned that I only really come back if I need help and/or if I'm posting a new map/library.
I just checked the wiki, from the description I think I'm mistaken. Catalogs allow you to change on a player by player basis, not a unit by unit basis. Yaksman's answer I believe should be correct, as I do recall using such a function to mod unit stats before.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I recently started using the SC2 editor and am now getting the hang of it fairly well. I was wondering if it was possible to change a single units stat using triggers while not changing other same type units stats too. Specifically whether I can make a mineral field using triggers and then set the mineral amount(Stats-Amount under Minerals behavior) to a random number and repeat to make multiple random amount mineral fields. If anyone could help with this it would be great, Thank You. Alternatively, in data an event at creation to set it to a random number if able.
@Aaternus: Go
One way you could do it would be to make a behavior that does what you want with the minerals, then use triggers to take off and put back on the unit.
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
Try look up catalogs. I believe they allow you to set unity stats on a unit by unit basis. There is a limitation though, not all stats can be modified
Thank you for your advice, I must of misunderstood catalogs as I thought they changed all units of that types stats. I will attempt to do that and if it doesn't work use a behavior as suggested above. I will post again if neither method works. Edit: I ended up creating multiple mineral field behaviors with different values for each, deleting the default and applying a random one of my new behaviors using a trigger.
@Aaternus: Go
Set Unit Property works for 1 or 2 of the stats that catalogs cannot change.
@Aaternus: Go
I just checked the wiki, from the description I think I'm mistaken. Catalogs allow you to change on a player by player basis, not a unit by unit basis. Yaksman's answer I believe should be correct, as I do recall using such a function to mod unit stats before.