Aller au contenu

Photo

Why aren't my NPCs working?


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
FlashElf

FlashElf
  • Members
  • 7 messages
My NPCs aren't gaining XP with the pc, nor do they appear to have any AI (they won't follow the PC around)

I use this function to initialize them, then I have to set their XP.
Is there anything wrong with this?

void PrepCompanion( string sTag, string sWP )
{
    object oWP = GetWaypointByTag( sWP );

    RemoveRosterMember( sTag );
    AddRosterMemberByTemplate( sTag, sTag );
    SpawnRosterMember( sTag, GetLocation( oWP ) );
    SetIsRosterMemberSelectable( sTag, 0 );
    SetIsRosterMemberCampaignNPC( sTag, 0 );
}

#2
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 598 messages
For companions to gain XP they have to have the designer xp mod set. See this thread.

Regards

#3
FlashElf

FlashElf
  • Members
  • 7 messages
Thanks, that was very helpful

#4
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 598 messages
Here is a thread that explains the commands for adding companions. Other threads can be found by googling for nwn2 companion scripts.

Regards