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.
Syntax
Section titled “Syntax”SetActorPrompt(id, prompt)| Parameter | Type | |
|---|---|---|
id |
number | the actor |
prompt |
string | nil | the word; nil = none |
Returns
Section titled “Returns”boolean - false for anything but an actor
Example
Section titled “Example”local guard = CreateActor("test_cuman_ai", x, y, z, 180, "Gate guard")SetActorPrompt(guard, "Talk")See also
Section titled “See also”GetActorPrompt · OnPlayerInteractActor · SetActorShop · the NPC actors group of the index
