BlzSetSpecialEffectColorByPlayer
- Parameters
-
whichEffect effect
whichPlayer player
- comment
Sets the tinting color to match the specific player’s color.
- note
Not all models have a surface that can be colored by tinting. E.g. a campaign building (prop) cannot show an owner's color, but regular playable units and buildings can.
- note
If the effect is attached to a unit, then whenever the unit is recolored, that new color will be applied to attached effects too:
SetUnitColor
,SetUnitOwner
(when changeColor is true).Example (Lua):
-- hero created for Player Red bloodmageSorc = CreateUnit(Player(0), FourCC("Hblm"), 0,0, 0) -- Sorceress has red color by default, it's the standard color for tinted models sorceressBm = AddSpecialEffectTarget([[units\human\sorceress\sorceress.mdx]], bloodmageSorc, "head") -- both hero and sorceress turn green SetUnitColor(bloodmageSorc, PLAYER_COLOR_GREEN) -- change only sorceress to purple BlzSetSpecialEffectColorByPlayer(sorceressBm, Player(3))
- patch
1.29.2.9231
- Source
- common.j
- return type
nothing
- Source code
native BlzSetSpecialEffectColorByPlayer takes effect whichEffect, player whichPlayer returns nothing