question using FloatingTextStringOnCreature
Posted: Fri Jan 16, 2004 7:16 am
I'm trying to get an NPC to say hello using this function when a PC enters a trigger. Here's my code:
I placed an NPC with the tag "greeter" next to the trigger.
but it's not working. Any help please?
Code: Select all
void main()
{
object oVisitor = GetEnteringObject();
object oGreeter = GetNearestObjectByTag("greeter");
string szVisitorName = GetName(oVisitor);
string szGreeting = ("Hello, " + szVisitorName);
if(GetIsPC(oVisitor))
{
FloatingTextStringOnCreature(szGreeting, oGreeter);
}
}
but it's not working. Any help please?