Staredit Network > Forums > SC2 Assistance > Topic: Changing colors of Unit/Actor/Model?
Changing colors of Unit/Actor/Model?
Jul 9 2010, 6:53 pm
By: Cheese  

Jul 9 2010, 6:53 pm Cheese Post #1



I've seen in certain maps (like Death Baneling, and Stay Alive) and a few others that the units had an unusual tint, or color to them, some banelings were red, purple, blue, or green (not player color, but the whole unit was that color) and in Stay alive, the pylons were entirely blue, or green, how can I do this?

Is this possible with attacks as well? Because I have seen purple and green void ray beams.

Help would be appreciated, thanks.

-Mp)Cheese



None.

Aug 13 2010, 7:39 pm shmeeps Post #2



Sorry for the late bump, but yes, it is possible. If you go to the actor for the unit/weapon, create a new event under (Actor Events), with the event Unit Birth (I assume Actor creation would work here as well), then select the unit/weapon/actor (depending on which msg event you chose) that you wish. For the action, you would do Set Tint Color (Or something similar, I'm sure any color changing event would work.), then change the color to what you wish.

I can provide screenshots if needed.



None.

Aug 13 2010, 8:12 pm payne Post #3

:payne:

Quote from shmeeps
Sorry for the late bump, but yes, it is possible. If you go to the actor for the unit/weapon, create a new event under (Actor Events), with the event Unit Birth (I assume Actor creation would work here as well), then select the unit/weapon/actor (depending on which msg event you chose) that you wish. For the action, you would do Set Tint Color (Or something similar, I'm sure any color changing event would work.), then change the color to what you wish.

I can provide screenshots if needed.
I wanted to try that out on Sentries.
I ended up not finding what to set in "Source Name" and "Sub Name".
Also, as action, is there a way to make "Set Tint - Controller's Color" ?



None.

Aug 13 2010, 8:54 pm shmeeps Post #4



Quote from payne
Quote from shmeeps
Sorry for the late bump, but yes, it is possible. If you go to the actor for the unit/weapon, create a new event under (Actor Events), with the event Unit Birth (I assume Actor creation would work here as well), then select the unit/weapon/actor (depending on which msg event you chose) that you wish. For the action, you would do Set Tint Color (Or something similar, I'm sure any color changing event would work.), then change the color to what you wish.

I can provide screenshots if needed.
I wanted to try that out on Sentries.
I ended up not finding what to set in "Source Name" and "Sub Name".
Also, as action, is there a way to make "Set Tint - Controller's Color" ?
Here's some screenshots for what I did for sentries to turn them a pinkish color (The end result is also posted). I don't see any Controller's Color, but I do see a Team Color, but I don't know if that just changes the color value of the team color for that unit (IE, make a red player's unit appear as a white player's unit).

[attach=7313]
[attach=7314]
[attach=7316]

Interestingly enough, I also see things about glows, halos, and a few others. I'm going to have to do some experimentation.

Attachments:
Tint1.PNG
Hits: 0 Size: 33.48kb
Tint2.PNG
Hits: 0 Size: 35.79kb
Tint3.JPG
Hits: 0 Size: 52.66kb

Post has been edited 1 time(s), last time on Aug 13 2010, 9:14 pm by shmeeps.



None.

Aug 13 2010, 9:41 pm payne Post #5

:payne:

You changed the color of the Sentry of one player, if I understood well.
What I want is to keep the Sentries' colors the same as players' (Player 1 = red, 2 = blue, etc.), but have their respective beam (attack) color fit their player color. :O



None.

Aug 13 2010, 10:12 pm shmeeps Post #6



Unfortunately no, I haven't figured out a way to do that. The above method makes every sentry tint a color, regardless of owner. I haven't found a way to bring in controllers color or variables into actor events, if either of those are found I'm sure it would be possible.



None.

Aug 13 2010, 10:52 pm payne Post #7

:payne:

Quote from shmeeps
Unfortunately no, I haven't figured out a way to do that. The above method makes every sentry tint a color, regardless of owner. I haven't found a way to bring in controllers color or variables into actor events, if either of those are found I'm sure it would be possible.
Well, of course, we could duplicate the Sentry for every player, but I'm pretty sure there's an easier way to achieve my goal.



None.

Aug 13 2010, 10:58 pm Temp Post #8



Quote from shmeeps
Unfortunately no, I haven't figured out a way to do that. The above method makes every sentry tint a color, regardless of owner. I haven't found a way to bring in controllers color or variables into actor events, if either of those are found I'm sure it would be possible.

This may be a little much but adding a dummy ability for each colour and using triggers to activate it when a new one is placed on a map (different ability per player of course) may get around this, I will look into player conditions in actor events though.



None.

Aug 13 2010, 11:25 pm shmeeps Post #9



Yeah, my idea was to use triggers to detect when certain conditions are met (in this case, a Sentry is attacking), and replace the beam actor with another model, or apply a tint to it (which I believe can be done with triggers. I'm not 100% though). This would be cumbersome though, if nothing else.



None.

Aug 14 2010, 12:24 am Temp Post #10



Ok so I've made some progress for those who are interested. I have it so that I can tint units based on whether they are a player or a computer. I cannot get this to work for the beam (I can tint the beam but I can't do a validate player for it). This uses no triggers. Map is attached.

The important bit here is the two events on the sentry unit actor and the two validators I created (PlayerIsUser and PlayerIsComp)

The events look like this where the 1st item is a term

Actor Creation
  • ValidatePlayer PlayerisUser
  • SetTintColor 0,0,0


Attachments:
ColourTesting.SC2Map
Hits: 1 Size: 25.28kb



None.

Aug 14 2010, 12:37 am shmeeps Post #11



Interesting, never thought of using a validator. I see one of type "Player", but can't seem to base a validator off of it. I wonder if that could be used.

Even if not, it would be possible to rig it a bit, and use a validator for something unused, for instance, a check of the amount of terrazine or customer resource for the player, where the amount that they have is equal to the player number.

Just a thought.

As for the beams, I don't think they are "owned" by any particular player, technically, and are just created between the two units. It might be possible to make the beam inherit the needed flag though.



None.

Aug 14 2010, 3:22 am Temp Post #12



I can't even seem to find when the beam actor is created (most of the attacks are created when an effect occurs but this one isn't). If it inherits from the right object we may be able to send a signal to it.

I'm not sure what the player validator is for, it does not seem to validate anything.

Another thing that seemed promising is the Compare Field term for actor events. There is a lot of stuff there but requires a text string to access most things and of course there is no documentation.



None.

Aug 14 2010, 4:31 am shmeeps Post #13



That does seem promising. Any possibility that's the same as just a custom script? If that were the case it might be a bit easier to get something working, assuming the field name could be figured out.



None.

Aug 14 2010, 6:11 am Temp Post #14



I doubt it. You can find some examples of the use of it. Some unit actors have the Compare field term like this.

Type: System, Main
Field: UnitFlags[e_actorUnitFlagShowBlobShadow]
Operator: Equal To
Value: 1



None.

Aug 14 2010, 11:42 am Temp Post #15



Ok, so I think I've managed to do this. I've attached a map where if you have above 0 minerals you get a colour on the beam.

A few changes I needed to make:

- Changed the SentryAttack actor's Actor - Beam Scope field to Caster
- Changed the Effect.Disruption Beam.Stop term (from SentryAttackBeam) to At Caster instead of At Effect


This should allow us to colour beams based on players through the Player Requirement validator (which checks to see if a player meets a requirement). This could be something like giving each player a unique amount of a unit or creating an upgrade/ability that is unique for each player.

UPDATE: I've updated the map to colour the beam based on how many marines the player owns. This is more realistic in an actual map for colouring based off of player.

Attachments:
ColourTesting.SC2Map
Hits: 1 Size: 27.44kb

Post has been edited 1 time(s), last time on Aug 14 2010, 9:14 pm by Temp.



None.

Aug 15 2010, 4:25 am payne Post #16

:payne:

Tested it with 7 players.
Looks like you had made it only for 2. :P

Anyways, if I understood right:
- You had to tint the 2 sentries
- The beam color would only change if the 2 sentries attacked each other, and not the others

I conclude this would require enormous amount of work to get to work efficiently in a large map. ;o



None.

Aug 15 2010, 5:05 am Temp Post #17



I didn't have to tint the sentries, I just left that in. Im not sure what you mean by the second point.



None.

Aug 15 2010, 5:12 am payne Post #18

:payne:

Quote from Temp
I didn't have to tint the sentries, I just left that in. Im not sure what you mean by the second point.
The only colored beam I saw was the one coming out from Player 2's Sentry and attacking Player 1.
It never happened in any other case.



None.

Aug 15 2010, 7:28 am Temp Post #19



Quote from payne
Quote from Temp
I didn't have to tint the sentries, I just left that in. Im not sure what you mean by the second point.
The only colored beam I saw was the one coming out from Player 2's Sentry and attacking Player 1.
It never happened in any other case.

Both of the beams are coloured. You can adjust the colour in the actor events for the SentryAttackBeam actor.



None.

Aug 16 2010, 12:36 am payne Post #20

:payne:

Quote from Temp
UPDATE: I've updated the map to colour the beam based on how many marines the player owns. This is more realistic in an actual map for colouring based off of player.
I don't get why it is more realistic. :O



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07:47 pm]
Ultraviolet -- Yeah, I suppose there's something to that
[2024-5-06. : 5:02 am]
Oh_Man -- whereas just "press X to get 50 health back" is pretty mindless
[2024-5-06. : 5:02 am]
Oh_Man -- because it adds anotherr level of player decision-making where u dont wanna walk too far away from the medic or u lose healing value
[2024-5-06. : 5:01 am]
Oh_Man -- initially I thought it was weird why is he still using the basic pre-EUD medic healing system, but it's actually genius
[2024-5-06. : 3:04 am]
Ultraviolet -- Vrael
Vrael shouted: I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
With the modern EUD editors, I don't think they're calculating nearly as many offsets as you might imagine. Still some fancy ass work that I'm sure took a ton of effort
[2024-5-06. : 12:51 am]
Oh_Man -- definitely EUD
[2024-5-05. : 9:35 pm]
Vrael -- I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
[2024-5-05. : 9:35 pm]
Vrael -- that is insane
[2024-5-05. : 9:35 pm]
Vrael -- damn is that all EUD effects?
[2024-5-04. : 10:53 pm]
Oh_Man -- https://youtu.be/MHOZptE-_-c are yall seeing this map? it's insane
Please log in to shout.


Members Online: NudeRaider, Lost_Angel