Okay, so I actually have two questions but they are along very similar lines and deal with the same topic so here goes...
1) When a unit is colored based on their team in game is that color just a texture or is it a modification of a base texture? I know in some game engines developers can set things up so that texture colors can be manipulated on the fly for things that change color so I simply want to know if the team colors are a product of a system like this or if there is a separate texture stored with the Starcraft 2 engine somewhere for each possible team. Also, if they are not all different textures, how do I add more colors to the list of team colors? Is that even possible?
2) On a similar note, does anyone have any idea how I might be able to "unlink" the colors with the teams? What I mean is, I am planning on trying to create an entirely new RTS through the Starcraft 2 tools and one of the ideas within the RTS deals with color manipulation so the color of a unit would represent what types of abilities it has. In this case we would be using the "Race" of the units to determine the team they are on because any player could want to make a red unit if they need red abilities. Is there a way I could unlink these two attributes, color and team number, so any player could spawn units of any color? Also don't worry if you don't know how I would manipulate the color on the fly or anything, I can figure that out once I have an idea of whether what I want to do is even possible, I just thought I'd see if anybody knew whether I could do it.
For 1) Not a clue. I'm pretty sure they use textures which can change colors because there aren't alternate color schemes for units listed in the editor.
2) The function that will help you the most is Set Unit Color. I would use a Unit Is Created event and modify each unit's color upon creation. You can just operate a switch based on the unit's available abilities or whatever.
As a side note, the player will still be able to change his color options to make himself blue, his allies teal, and enemies red. I'll get back to you if I find a workaround for that.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Okay, so I actually have two questions but they are along very similar lines and deal with the same topic so here goes...
1) When a unit is colored based on their team in game is that color just a texture or is it a modification of a base texture? I know in some game engines developers can set things up so that texture colors can be manipulated on the fly for things that change color so I simply want to know if the team colors are a product of a system like this or if there is a separate texture stored with the Starcraft 2 engine somewhere for each possible team. Also, if they are not all different textures, how do I add more colors to the list of team colors? Is that even possible?
2) On a similar note, does anyone have any idea how I might be able to "unlink" the colors with the teams? What I mean is, I am planning on trying to create an entirely new RTS through the Starcraft 2 tools and one of the ideas within the RTS deals with color manipulation so the color of a unit would represent what types of abilities it has. In this case we would be using the "Race" of the units to determine the team they are on because any player could want to make a red unit if they need red abilities. Is there a way I could unlink these two attributes, color and team number, so any player could spawn units of any color? Also don't worry if you don't know how I would manipulate the color on the fly or anything, I can figure that out once I have an idea of whether what I want to do is even possible, I just thought I'd see if anybody knew whether I could do it.
For 1) Not a clue. I'm pretty sure they use textures which can change colors because there aren't alternate color schemes for units listed in the editor.
2) The function that will help you the most is Set Unit Color. I would use a Unit Is Created event and modify each unit's color upon creation. You can just operate a switch based on the unit's available abilities or whatever.
As a side note, the player will still be able to change his color options to make himself blue, his allies teal, and enemies red. I'll get back to you if I find a workaround for that.