Skip to content

SetEntityPrompt

The use prompt on a prop or an interaction point (an actor’s too).

A prop with a prompt shows the game’s use hint with your text while a player looks at it, and the use key calls OnPlayerInteract; nil or "" takes a prop’s prompt off. On an interaction point it changes the text (a point keeps one - DestroyEntity removes it). On an NPC actor it is SetActorPrompt. As written, up to 48 characters.

SetEntityPrompt(id, text)
Parameter Type
id number the prop, point or actor
text string | nil the prompt; nil = none

boolean - false for anything else (a horse, a pickup, an animal …)

local barrel = CreateProp("barrel_a", x, y, z)
SetEntityPrompt(barrel, "Search the barrel")

CreateInteraction · OnPlayerInteract · GetEntityPrompt · SetActorPrompt · the Props group of the index