I would like to create a custom unit flag in data which I can assign to unit types to quickly and easily decipher using triggers whether a unit belongs to this arbitrary group of unit types I have created.
So, units have attributes such as 'biological, mechanical' etc. My understanding is that you cannot create new attributes, but you can rename current ones. That does not work for me because I cannot impact game balance or settings at all.
So 'flags' are these things further down in the unit data, they include things such as 'cloaked, missile, hero' etc. Is it possible to create a custom one of these flags which I can enable on the unit types I want and then check to see if units have that flag in triggers?
@rtschutter: Go No, you can't create new flags. Once I asked for new arbitrary unit "types" in Blizzard forums, so we could use them as we pleased but I got no answer from them. If you don't want to touch the original flags I think you're in trouble, but maybe someone found a clever way to work around it.
The ones you call Attributes have no direct effect in the game other than damage modifiers so I believe these are the best to be changed. The ones you call flags have direct effects in the game so they don't make good arbitrary flags. Also I'm not sure you can point to therm using triggers just like you can with the Attributes (I'm not good with triggers).
Is there something special I need to do with the behavior? I made up a fake attribute behavior and gave it to the unit, but whenever I use the condition "Unit has behavior" it fails even on the unit I gave the behavior to.
I am creating a system that will allow players to enable or disable the "Stronger Team Colors" mod from the lobby. So when a unit gets created in the game I need to be able to check whether STC is available for that unit type. I am using the behavior to do this check, and if it passes I swap the default textures with the STC textures for that unit. I will probably post the mod file and map so other people can use it after I finish.
It has turned out to be more time consuming than I had anticipated. This texture by id stuff mostly works fine, but every now and then I run into one that I just don't understand. I will probably end up asking for help with finding out how to change the diffuse texture on Overseers, Hatcheries, Spine Crawlers and Supply Depots in the texture by id thread, because nothing I have tried yet has worked for those four.
Using the behavior as a buff is working so thank you for the help guys, I guess this one is solved, assuming it isn't difficult to figure out how to hide the buff.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I would like to create a custom unit flag in data which I can assign to unit types to quickly and easily decipher using triggers whether a unit belongs to this arbitrary group of unit types I have created.
So, units have attributes such as 'biological, mechanical' etc. My understanding is that you cannot create new attributes, but you can rename current ones. That does not work for me because I cannot impact game balance or settings at all.
So 'flags' are these things further down in the unit data, they include things such as 'cloaked, missile, hero' etc. Is it possible to create a custom one of these flags which I can enable on the unit types I want and then check to see if units have that flag in triggers?
Any help would be appreciated, thank you.
I suggest giving unit some dummy behaviours that will do nothing.
You can easily detect if unit has behaviour in triggers.
@rtschutter: Go No, you can't create new flags. Once I asked for new arbitrary unit "types" in Blizzard forums, so we could use them as we pleased but I got no answer from them. If you don't want to touch the original flags I think you're in trouble, but maybe someone found a clever way to work around it.
The ones you call Attributes have no direct effect in the game other than damage modifiers so I believe these are the best to be changed. The ones you call flags have direct effects in the game so they don't make good arbitrary flags. Also I'm not sure you can point to therm using triggers just like you can with the Attributes (I'm not good with triggers).
Maticpl's suggestion is a good one.
@maticpl: Go
Is there something special I need to do with the behavior? I made up a fake attribute behavior and gave it to the unit, but whenever I use the condition "Unit has behavior" it fails even on the unit I gave the behavior to.
@rtschutter: Go
give the behavior an icon.
make sure the behavior has an infinite duration
go in game and select the unit... is the behavior displayed on the unit?
What type of behavior should it be? I am using attribute...should I just use buff? Ideally it wouldn't show up in the unit info panel at all.
As an attribute behavior it is showing up right now in game but it messes up the info panel.
Use a Buff Those can be counted by triggers and hidden.
So far you have not given much info on what you want to do with it.
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
I am creating a system that will allow players to enable or disable the "Stronger Team Colors" mod from the lobby. So when a unit gets created in the game I need to be able to check whether STC is available for that unit type. I am using the behavior to do this check, and if it passes I swap the default textures with the STC textures for that unit. I will probably post the mod file and map so other people can use it after I finish.
It has turned out to be more time consuming than I had anticipated. This texture by id stuff mostly works fine, but every now and then I run into one that I just don't understand. I will probably end up asking for help with finding out how to change the diffuse texture on Overseers, Hatcheries, Spine Crawlers and Supply Depots in the texture by id thread, because nothing I have tried yet has worked for those four.
Using the behavior as a buff is working so thank you for the help guys, I guess this one is solved, assuming it isn't difficult to figure out how to hide the buff.