I'm looking to make UI buttons that are exactly like the lazy worker button but will only appear after I have a building built of the given type, Different for different Races. Anyone pulled this off?
I don't have that much experience with UI, so don't take my word for it. But I'm not sure you can make it exactly like it. However, you can position a small button onto the same size dialog just above that worker button by trial and error until it fits. Then you can make triggers that say when a unit is created, if that unit is of the unit type you want, then show the dialog for the player you want to show it to.
You could also do a search trigger to find how many of a unit the player has.
When you select and right click a unit set ta assign them a group number, example:two barracks and give them group 2. You see an icon dictating number of peeps in a group. Can you make that flash if there is a production building not producing. That is what I am aiming for (Terrans and Protoss Anyway), Zerg need one anytime a hatchery(or better) is added to a group and there are no larvae being spawned.
I have no idea as I have never tried. However, if there is it would probably be a UI action. I'm also not entirely certain that you can make a control group button do something, but you could make a normal button change to a different color every second. That would be somewhat notice-able.
If you can't find an action for editing control groups, I would suggest finding a few more people to make sure that you actually can't modify the control groups. Otherwise, you would have to disable them for your players, and then re-create your own ones. You would probably use something like when a player presses a key (not sure if the key pressed event allows the cntrl + 1 like control groups have), then add the unit that is currently selected to a variable (You'll have to check to make sure that it isn't a unit that is already there so that players can actually select it, unless it lets you use the cntrl + 1 in the event). Then if that key is pressed again (or if the second part of the key like the 1 in cntrl + 1, then if that key is pressed), and it has a unit in it, select that unit. And have something that checks if the unit is building something, and if it isn't, then make it pick a few integers and assign colors to each integer by saying something like if picked integer is 1, then make the button yellow or something. Use a While statement to make sure it is building something and to make it repeat.
I know that this is kind of long, but that would be the only way I can think of to do this which is why I suggested finding some other people's thoughts.
I'm looking to make UI buttons that are exactly like the lazy worker button but will only appear after I have a building built of the given type, Different for different Races. Anyone pulled this off?
@Arbetrayer: Go
I don't have that much experience with UI, so don't take my word for it. But I'm not sure you can make it exactly like it. However, you can position a small button onto the same size dialog just above that worker button by trial and error until it fits. Then you can make triggers that say when a unit is created, if that unit is of the unit type you want, then show the dialog for the player you want to show it to.
You could also do a search trigger to find how many of a unit the player has.
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
@fishy77: Go
When you select and right click a unit set ta assign them a group number, example:two barracks and give them group 2. You see an icon dictating number of peeps in a group. Can you make that flash if there is a production building not producing. That is what I am aiming for (Terrans and Protoss Anyway), Zerg need one anytime a hatchery(or better) is added to a group and there are no larvae being spawned.
@Arbetrayer: Go
I have no idea as I have never tried. However, if there is it would probably be a UI action. I'm also not entirely certain that you can make a control group button do something, but you could make a normal button change to a different color every second. That would be somewhat notice-able.
If you can't find an action for editing control groups, I would suggest finding a few more people to make sure that you actually can't modify the control groups. Otherwise, you would have to disable them for your players, and then re-create your own ones. You would probably use something like when a player presses a key (not sure if the key pressed event allows the cntrl + 1 like control groups have), then add the unit that is currently selected to a variable (You'll have to check to make sure that it isn't a unit that is already there so that players can actually select it, unless it lets you use the cntrl + 1 in the event). Then if that key is pressed again (or if the second part of the key like the 1 in cntrl + 1, then if that key is pressed), and it has a unit in it, select that unit. And have something that checks if the unit is building something, and if it isn't, then make it pick a few integers and assign colors to each integer by saying something like if picked integer is 1, then make the button yellow or something. Use a While statement to make sure it is building something and to make it repeat.
I know that this is kind of long, but that would be the only way I can think of to do this which is why I suggested finding some other people's thoughts.
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here