Welcome to the Builder Academy

Question NPC's reaction to player's say command

More
03 Sep 2024 09:18 #10422 by cry1004
I'm trying to create a trigger that reacts when I say a certain word.
However, it doesn't work, so I created the following code to test that it works regardless of what I say, and connected it to a mob.
I entered the room where the mob is and tried speaking, but there's no response.
I tried typing in Korean and speaking English words, but there's no response.
What's wrong?

#3020
Speech Analysis Example~
0 s 100
~
trig speech 100
if %actor.is_pc%
%send% %actor.name% You said: %speech%
end
~

Please Log in or Create an account to join the conversation.

More
03 Sep 2024 20:58 #10423 by thomas
Are you sure you're visible and have nohassle off?
What do you get from `tstat 3200` ?`

For just testing, try using * as the argument and 1 as numeric arg..

Ref:
TRIGEDIT-MOB-SPEECH TRIG-MOB-SPEECH TRIGEDIT-SPEECH TRIG-SPEECH

Activates when matching text is spoken by a character in the same room as the
mobile. This does not work for tells, gossip, etc.

Numeric Arg : 0: argument is a substring that must be found in the speech to cause a
match.
1: argument is a list of words, any of which found in the speech will
activate the trigger.
Argument : a phrase or wordlist to be matched.

Variables:
%actor% - the character whose speech activated the trigger.
%speech% - the entire phrase spoken.
%self% - the mobile.

Example: TSTAT 53, 2776, 63, 153, 1354, 139

See also: TRIGEDIT-ROOM-SPEECH
The following user(s) said Thank You: cry1004

Please Log in or Create an account to join the conversation.

Time to create page: 0.615 seconds