Skip to content

Dialogue

Mike-MF edited this page Jul 19, 2026 · 8 revisions

This page will explain the usage of the Dialogue function. Note; this does not include any kind of sound files. Only text on-screen.


/*
 * Author: Mike
 * On-screen text mimicking speech.
 *
 * Call only locally on one machine.
 *
 * Arguments:
 * 0: Person Speaking <STRING>
 * 1: Message <STRING>
 * 2: Colour (Hex code) <STRING> (optional - default: #FFFFFF)
 * 3: Fade in Time <NUMBER> (optional - default: 1)
 *
 * Colours are:
 * White - #fffffff
 * Black - #000000
 * Blue - #0000ff
 * Red - #ff0000
 * Yellow - #ffff00
 * Green - #00e600
 *
 * Return Value:
 * None
 *
 * Example:
 * ["John James", "I hate all of you."] call MFUNC(dialogue)
 */

Usage

This function will display text on-screen to mimick speech. It requires a speaker and speech with optional colour and how long it remains on screen. Colour schemes are listed above as hex codes.

If this is designed to be global it needs to be called only on 1 machine, I.e; ACE Action or Server only check.

If it's designed to only show for certain people, use the second example. I.e; Within a trigger.

Example 1:

["John James", "I hate all of you."] call TAC_Mission_fnc_dialogue;

Example 2:

["John James", "I hate all of you."] call TAC_Mission_fnc_dialogueLocal;

Clone this wiki locally