Skip to content

SetActorPrompt

The prompt under an actor’s name within reach - the use key on it reaches the mode.

A short word (“Talk”, “Trade”, “Challenge”) shown as [E] Talk under the name to a player within 3.5 m; the use key then fires OnPlayerInteractActor. nil or "" takes it off (the use key does nothing on the actor). An actor with a shop gets “Trade” by itself; a prompt set after that replaces the word, the shop still opens.

SetActorPrompt(id, prompt)
Parameter Type
id number the actor
prompt string | nil the word; nil = none

boolean - false for anything but an actor

local guard = CreateActor("test_cuman_ai", x, y, z, 180, "Gate guard")
SetActorPrompt(guard, "Talk")

GetActorPrompt · OnPlayerInteractActor · SetActorShop · the NPC actors group of the index