Moderator: Event DM
-
KinX
- Elder Sage
- Posts: 4965
- Joined: Tue Sep 10, 2002 2:53 pm
- Timezone: GMT +1
Post
by 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

This statement is false
-
Sindol
- Team Member; Retired with Honors
- Posts: 6479
- Joined: Mon Jan 06, 2003 4:23 pm
- Location: Nijmegen - Netherlands (GMT+1)
-
Contact:
Post
by 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
-
KinX
- Elder Sage
- Posts: 4965
- Joined: Tue Sep 10, 2002 2:53 pm
- Timezone: GMT +1
Post
by 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

This statement is false