osNpcSay not working?
Posted: Fri Jan 28, 2022 4:37 pm
I've been trying to use the osNpcSay() function, and it seems to fail silently. There's an example on that linked page to test it, which I've pasted at the end of this message.
The same applies to osNpcWhisper() and osNpcShout(). I'm in my own world, and other NPC functions such as osNpcCreate(), osNpcMoveToTarget(), etc work fine. It also works fine on a vanilla OS 0.9 grid.
Is this a Kitely issue? Thanks in advance!
Testing example:
The same applies to osNpcWhisper() and osNpcShout(). I'm in my own world, and other NPC functions such as osNpcCreate(), osNpcMoveToTarget(), etc work fine. It also works fine on a vanilla OS 0.9 grid.
Is this a Kitely issue? Thanks in advance!
Testing example:
Code: Select all
key npc;
default
{
state_entry()
{
llSay(PUBLIC_CHANNEL, "Touch to see osNpcSay (without channel) usage.");
}
touch_start(integer number)
{
key toucher = llDetectedKey(0);
vector npcPos = llGetPos() + <-1.0, 0.0, 1.0>;
osAgentSaveAppearance(toucher, "appearance");
npc = osNpcCreate("ImYour", "Clone", npcPos, "appearance");
state hasNPC;
}
}
state hasNPC
{
state_entry()
{
llSetTimerEvent(5.0);
}
timer()
{
llSetTimerEvent(0.0);
osNpcSay(npc, "Hello world!");
osNpcSay(npc, "I Love OpenSimulator!");
osNpcSay(npc, "The Open Source Metaverse!");
}
touch_start(integer number)
{
osNpcSay(npc, "Goodbye!");
llSetTimerEvent(0.0);
osNpcRemove(npc);
npc = NULL_KEY;
state default;
}
}