Server Totals
Deglos - (3)
Elysia - (1)
Visimontium - (1)
Wilderness - (1)
Ferrell - (0)
M'Chek - (0)
Le'Or - (0)
Underdark - (0)
Mikona - (0)
Total players: 6
Gallery
  • M'Chek - Azlae vs Nixtixu
    Album name: DM Events
    Uploaded by: Hamlet
    Uploaded: Wed Aug 20, 2014 12:40 am

Links Menu

question using FloatingTextStringOnCreature

Moderators: Nighthawk4, Dungeon Masters

question using FloatingTextStringOnCreature

PostAuthor: KinX » 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:

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?
Never argue with an idiot, they'll drag you down to their level and beat you with experience

Image

This statement is false
User avatar
KinX
Elder Sage
 
Posts: 4968
Joined: Tue Sep 10, 2002 2:53 pm
Timezone: GMT +1

PostAuthor: Sindol » Fri Jan 16, 2004 7:26 am

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".
So much fun,
yet so little time to enjoy it.
- Sindol
User avatar
Sindol
Team Member; Retired with Honors
 
Posts: 6487
Joined: Mon Jan 06, 2003 4:23 pm
Location: Nijmegen - Netherlands (GMT+1)

PostAuthor: KinX » Fri Jan 16, 2004 7:30 am

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
Never argue with an idiot, they'll drag you down to their level and beat you with experience

Image

This statement is false
User avatar
KinX
Elder Sage
 
Posts: 4968
Joined: Tue Sep 10, 2002 2:53 pm
Timezone: GMT +1


Return to NWN Scripting

Who is online

Registered users: Bing [Bot], Google [Bot]