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.
Syntax
Section titled “Syntax”SetEntityPrompt(id, text)| Parameter | Type | |
|---|---|---|
id |
number | the prop, point or actor |
text |
string | nil | the prompt; nil = none |
Returns
Section titled “Returns”boolean - false for anything else (a horse, a pickup, an animal …)
Example
Section titled “Example”local barrel = CreateProp("barrel_a", x, y, z)SetEntityPrompt(barrel, "Search the barrel")See also
Section titled “See also”CreateInteraction · OnPlayerInteract · GetEntityPrompt · SetActorPrompt · the Props group of the index
