Candy Logo Copyright © 2025-2026 Candy Arts

Roles
A Role stands in for an Actor when the character who speaks or acts isn't known in advance. For example, a Line spoken by the player's companion can't name an Actor, since the companion is chosen while the game runs. The Line is assigned the "companion" Role as its speaker instead, and the game assigns an Actor Reference to that Role when the player selects a companion. Roles Dictionary Roles are registered in the roles dictionary, in the Roles.gd script. It's a 'safe' file: updates never overwrite it. Each key is a Role name, and its value is the Actor Reference of the Actor currently assigned to it. An empty value means no Actor is assigned. Role References In Dialogues, a Role is written with the role symbol (° by default) before its name: °companion. A Role Reference is accepted wherever an Actor Reference is, such as the speaker of a Line. When the Line runs, the Engine replaces the Role by the Actor assigned to it. Assigning Roles An Actor is assigned to a Role by the Role command, or by your game code through candy_de.roles. For example, when a character joins the player's party, your game assigns their Actor Reference to the "companion" Role.