Page 1 of 1

question using FloatingTextStringOnCreature

Posted: Fri Jan 16, 2004 7:16 am
by KinX
I'm trying to get an NPC to say hello using this function when a PC enters a trigger. Here's my code:

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);
    }
}
I placed an NPC with the tag "greeter" next to the trigger.

but it's not working. Any help please?

Posted: Fri Jan 16, 2004 7:26 am
by Sindol
Floating text strings are those things that float above your head now and then (like the "locked" when you try a locked door or other flavor texts). They can only be made visible to yourself and members of your faction (read: party) if set properly.

I think you should look into using the function SpeakString to replace the FloatingTextStringOnCreature. You can use AssignCommand to have it executed by the NPC "greeter".

Posted: Fri Jan 16, 2004 7:30 am
by KinX
Sindol wrote:Floating text strings are those things that float above your head now and then (like the "locked" when you try a locked door or other flavor texts). They can only be made visible to yourself and members of your faction (read: party) if set properly.

I think you should look into using the function SpeakString to replace the FloatingTextStringOnCreature. You can use AssignCommand to have it executed by the NPC "greeter".
ahh ok. I just wanted to use the FloatingtextStringOnCreature cos i thought it looked cooler on an NPC than SpaekString. ahh well.

Thanks for the quick reply