<aside> 📦 DTADD.acs

</aside>

<aside> âš¡ int CreatePlayerTranslation(int id, int cyan, int blue)

</aside>

Usage


This function acts as a shorthand, wrapper for the Zandronum function CreateTranslation. However, it also logs the ID being used into a table for the debug functions, [core_checktranslation](<https://mm8bdm.notion.site/core_checktranslation-b2f12d896d2245c1953d85748824935a>) and [core_logtranslations](<https://mm8bdm.notion.site/core_logtranslations-848d101d944b4b719bf3d029bdf244e2>).

Parameters

<aside> 💡 Note: The RGB triplet being referred to here is an integer that has been packed with bytes such that the first byte is a 0-255 red value, the second byte is a 0-255 green value, and the third byte is a 0-255 blue value.

An integer such as this can be made using the rgbTriplet function from COLOFUNC.acs or it can be done using the functions and scripts noted in the [Pack Bytes and Shorts](<https://mm8bdm.notion.site/Pack-Bytes-and-Shorts-16ba96bd2e1e45d2ba5534fb8bc34e32>) page.

</aside>

Return Value

Example


This example highlights 2 translations made in base MM8BDM, one that only uses palette colors and another that uses an RGB triplet to show how it is done using the rgbTriplet function from COLOFUNC.acs.

#include "COLOFUNC.acs"

script "core_shortenedcolors" OPEN CLIENTSIDE {
	CreatePlayerTranslation (CLR_JEWELMAN, 4, 36);
	CreatePlayerTranslation (CLR_MAGMAMAN, 216, rgbTriplet(208, 32, 32));
}

See Also


CreatePlayerTranslationGlow

DefineTranslation