<aside> ⚡ script "core_chargecolor" (int weap, int teamweap)
</aside>
This script is essentially an alias for:
ACS_NamedExecuteWithResult("core_weaponcolor", weap, CLRF_SILENT, teamweap);
weap
: Int - The translation ID to swap the player to use.<aside>
💡 Note: CLR_PREVCOLOR
is a special constant which can be used for this parameter to not change the user’s color. Useful if you only need a weapon swap noise!
</aside>
teamweap
: Int - The starting translation ID of 4 consecutive translations, one for each of the 4 teams. For example, the default value for this parameter is TCLR_DEFAULT
, which is 230, because TCLR_LIGHT
is 230, TCLR_WILY
is 231, TCLR_COSSACK
is 232, and TCLR_KING
is 233.<aside>
💡 Note: This parameter is what facilitates team charge color animations, so check out [Team Colors](<https://mm8bdm.notion.site/Team-Colors-679c2e935457413dba70d2375689b089>)
for more info.
</aside>
Below is a modified excerpt of Homing Sniper’s charge animation
Charge2AnimStart:
TNT1 A 0 A_GunFlash("ChargeLevel2")
Charge2Anim.A:
HSNI I 1 ACS_NamedExecuteWithResult("core_chargecolor",CLR_HOMINGCHRG2,TCLR_CHARGE2)
HSNI C 0 A_Refire("Charge2Anim.B")
Goto Fire1
Charge2Anim.B:
HSNI J 1 ACS_NamedExecuteWithResult("core_chargecolor",CLR_HOMINGCHRG3,TCLR_CHARGE3)
HSNI C 0 A_Refire("Charge2Anim.C")
Goto Fire1
Charge2Anim.C:
HSNI C 1 ACS_NamedExecuteWithResult("core_chargecolor",CLR_HOMINGSNIPER,TCLR_DEFAULT)
HSNI C 0 A_Refire("Charge2Anim.A")
Goto Fire1