I'm trying to duplicate the "commentary" in 1v1 obs maps. This feature provides text messages to the screen like "Player 1 - Barracks" when player 1 builds a barracks. I'm trying to do this in the most efficient way possible cpu-wise. For buildings, I have a trigger setup for when any unit is created. The next step is seeing if the unit is a Structure. Is there a simpler way of doing this than manually going through each unit that is a structure to see if the unit type of the created unit matches (such as "is this a barracks?", "is this a depot?", "is this a factory?", etc). Thanks.
Are you making seperate triggers for each building or what? In that case just make 1 trigger with unit is created, have a condition that checks whether its a structure, and make the chat message use Catalog Field Value Get (Or any other way to get the units name)
Or are you using mass conditions to have every unit type? In that case just check the units unit filters (dont know what the exact function is called...)
"Unit is created"
"Triggering unit type == Marine"
That would be a massive amount of triggers, but be pretty exact. Personally, I think it would annoy me like crap to have this playing for me while I was playing. Having to micro while reading ect is not do-able propperly and it would obscure my vision.