Trigger just for NPC
DarkAlice
Member Posts: 7
Hello again!
I created a script that works fine but the content should be fire only through an NPC.
I need to set a trigger enter only for an NPC use and when the player walks in it nothing should be happen.
How can I do? Thanks in advance as always!
I created a script that works fine but the content should be fire only through an NPC.
I need to set a trigger enter only for an NPC use and when the player walks in it nothing should be happen.
How can I do? Thanks in advance as always!
0
Comments
TR
void main()
{
object oTarget;
oTarget = GetEnteringObject ();
oTarget = GetObjectByTag("Pippa");
AssignCommand(oTarget, PlayAnimation(ANIMATION_LOOPING_SIT_CROSS, 1.0, 7.0));
AssignCommand(oTarget, SpeakString ("I'm so tired!"));
object oWp;
oWp = GetWaypointByTag ("WP_Pippa_02");
DelayCommand (9.0f,AssignCommand(oTarget, ActionMoveToObject (oWp)));
}
If you haven't already, grab a copy of the downloadable NwN Lexicon 1.69. As it says, it only covers upto NwN version 1.69 but it does contain explanations of most of the functions that you'll that you'll need. Even if you can't access a windows chm file, there is a link (under Related Projects) on the project page, to the online version of the lexicon that covers all the functions that EE has.
TR
And yes, the Lexicon is a very useful guide but sometimes I still make syntax errors. I need more practice.
TR's Basics - Decisions
TR's Basics - Boolean Algebra
TR's Basics - Mostly Operators
They are all in fully bookmarked pdf files. Just take a look at the project pages and see if you think they might be useful for you. Hint - I won't be offended if you decide not to download any of them . One other thing you might find of use -
Just The FAQs, ma'am - These are the scripting FAQs (Frequently Asked Questions with Answers)
TR
TR