set tint color by actor-event

MissKerrigan

Active Member
Reaction score
23
Hi,

I made an actor-event if a creep got poisoned, this creep gets a green color
If a creep got slowed, this creep gets a blue color

My question: if a slowed unit gets poisoned, how do I give this a teal color?

Same with corrosion: when a creep got hit by the corrosive tower, it gets a red color
Together with slow, this must becomes purple and together with poison it must get a yellow color
All this 3 behaviors must given the creep a pink color :)


Think if I know 1 thing I know to do all this right?

Hope anybody understands what I'm trying to do here


MissKerrigan
 

Dave312

Censored for your safe viewing
Reaction score
269
When setting a tint, give them a label (and use the Clear Tint Color action to clear that tint label when removing). What happens then is that tints with different labels are applied over the top of each other. So if your unit is slowed and poisoned, the unit will receive a Blue tint and a Green tint, resulting in an overall teal tint.
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
To clarify. In the data editor, in the Events + field, in the "Set Tint color" message.

You can specify a Label. This is used to distinguish between different actor messages and can be used as a reference. By default, the label will be at "Custom". This allows you to enter any string that will later be used as a reference.

Basically, all you have to do is go to where you do your poison tint and set the label to "PoisonLabel"(it can be anything really). Also set the slow tint label to "SlowLabel" and the corrosive tint label to "CorrosiveLabel".
 

MissKerrigan

Active Member
Reaction score
23
I still don't get it

I try to explain my question more detailed:

Poison: the poison behavior takes 10 seconds and targeted unit must turn into green color
Slow: the slow behavior takes 10 seconds and targeted unit must turn into blue color
Corrision: the corrisive behavior takes 10 seconds and targeted unit must turn into red color

Poison + Slow: targeted unit must turn into teal color
Poison + Corrosion: targeted unit must turn into yellow color
Slow + Corrosion: targeted unit must turn into purple color
Slow + Poison + Corrosion: targeted unit must turn into pink color

I have several questions about this:

1. I know how to change the unit color by trigger or actor-event, I just don't understand the next thing:

a unit get's POISONED and 5 seconds later a SLOW tower fires at it (remember all of the behaviors takes 10 seconds)
so the color of the targeted unit must be green first, after 5 seconds it must turns teal, and the finally 5 seconds it must be blue because the last 5 seconds only the SLOW effect is on it

How do I trigger this?

I made 3 triggers:

event: any player using effect 'poison'
condition: none
action: set unit color to player 'green'

event: any player using effect 'slow'
condition: none
action: set unit color to player 'blue'

event: any player using effect 'corrosion'
condition: none
action: set unit color to player 'red'

This seems to work but not the way I want

I don't understand the part if a unit takes multiple behaviors and switch between these colors

MissKerrigan
 

Dave312

Censored for your safe viewing
Reaction score
269
Just to clarify: When a unit has more than one buff, do you want the unit to have a certain colour or do do you want the units colour to be a combination of the colours for each individual buff the unit has? The second option will be much easier to implement if you don't have a preference.
 

Dave312

Censored for your safe viewing
Reaction score
269
I would be using actor-events. In the other thread I explained how to tint the unit when they have a particular buff. You need to do the exact same thing but when you use the Set Tint Color action, there is a parameter called Label (see attached image) which you should set to a value. So in the end, your actor events should look something like this:

Code:
Behaviour.Poison.On
   SetTintColor 150,255,150 0.000000 OneShot PoisonTint

Behaviour.Poison.Off
   ClearTintColor 0.000000 PoisonTint

Behaviour.Slow.On
   SetTintColor 150,150,255 0.000000 OneShot SlowTint

Behaviour.Slow.Off
   ClearTintColor 0.000000 SlowTint

etc...

The way this works is that tints with different labels don't overwrite each other, but rather are added on top of each other. So if a unit has both poison and slow, the unit will be tinted both green and blue to give a teal colour. Let me know if you get stuck or something doesn't make sense.

TintLabels.png
 

MissKerrigan

Active Member
Reaction score
23
I understand it but nothing happens though, I do set this tint color in the poison/slow tower am I right?
 

Dave312

Censored for your safe viewing
Reaction score
269
You need to add it to the GenericUnitBase actor. All unit actors are based on this actor (or another actor based on this actor), so by adding events to this actor, all units will have these events. The alternative would be to add these events to every unit in your map.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top