PDA

View Full Version : Henchmen script


sekan
07-25-2007, 07:24 PM
I'm trying to make a npc follow the pc with this script.


#include "k_inc_generic"
#include "k_inc_switch"
#include "k_inc_utility"
#include "k_inc_fpm"

void main()
{
object oEnemy = GetNearestCreature(CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN,
OBJECT_SELF, 1, CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY);

if(!GN_GetSpawnInCondition(SW_FLAG_AI_OFF) && !GetSoloMode())
{
if(GetPartyMemberByIndex(0) != OBJECT_SELF)
{
if(GetCurrentAction(OBJECT_SELF) != ACTION_WAIT &&
!GetIsConversationActive() &&
!GN_GetSpawnInCondition(SW_FLAG_SPECTATOR_STATE) &&
GetCommandable())
{
if(!GN_GetIsFighting(OBJECT_SELF) && !GetIsObjectValid(oEnemy))

ClearAllActions();
FollowAccurate();
FPM_DebugFastRF();
}
}
}
else if(GetSoloMode() && GetCurrentAction(OBJECT_SELF) == ACTION_FOLLOWLEADER)
{
ClearAllActions();
}
if(GN_GetSpawnInCondition(SW_FLAG_EVENT_ON_HEARTBE AT))
{
SignalEvent(OBJECT_SELF, EventUserDefined(1001));
}


}

The problem is i can't even Compile the script bcz http://img402.imageshack.us/img402/6349/showap1.jpg (http://imageshack.us)
this error always comes up. Anyone who knows what the problem is?

stoffe
07-25-2007, 07:28 PM
#include "k_inc_generic"
#include "k_inc_switch"
#include "k_inc_utility"
#include "k_inc_fpm"

The problem is i can't even Compile the script bcz http://img402.imageshack.us/img402/6349/showap1.jpg
this error always comes up. Anyone who knows what the problem is?

According to the error message the script compiler cannot locate the k_inc_fpm.nss file. This is not a standard include file, so if you have created it you'll need to put it somewhere the compiler can find it. I think the override folder works if you use KotorTool's embedded script compiler.

sekan
07-25-2007, 07:38 PM
According to the error message the script compiler cannot locate the k_inc_fpm.nss file. This is not a standard include file, so if you have created it you'll need to put it somewhere the compiler can find it. I think the override folder works if you use KotorTool's embedded script compiler.

Thanks :D but what shall i include in this new script?