EDIT: I looked up the script called "bhn200cr_cousland_follower" and "bhn200ar_castle_after_siege" that was created by the developers. I tried to modify it but my NPCs are not still following me. These the scripts that I looked at
"bhn200cr_cousland_follower.nss"
//::///////////////////////////////////////////////
//:: Creature Events
//:: Copyright © 2003 Bioware Corp.
//:://////////////////////////////////////////////
/*
Creature events for Cousland nonparty followers
*/
//:://////////////////////////////////////////////
//:: Created By: Cori
//:: Created On: 30/01/09
//:://////////////////////////////////////////////
#include "log_h"
#include "utility_h"
#include "wrappers_h"
#include "events_h"
void main()
{
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);
string sDebug;
object oPC = GetHero();
object oParty = GetParty(oPC);
int nEventHandled = FALSE;
switch(nEventType)
{
////////////////////////////////////////////////////////////////////////
// Sent by: AI scripts
// When: The current creature dies
////////////////////////////////////////////////////////////////////////
case EVENT_TYPE_DEATH:
{
object oKiller = GetEventCreator(ev);
int nFollower = GetLocalInt(OBJECT_SELF,CREATURE_DO_ONCE_A);
//If the creature has been flagged as a non-party follower
if(nFollower == TRUE)
{
object oArea = GetArea(OBJECT_SELF);
//subtract from the nonpartyfollower counter, so more can be added later
int nNonPartyFollowers = GetLocalInt(oArea,AREA_COUNTER_1)-1;
SetLocalInt(oArea,AREA_COUNTER_1,nNonPartyFollowers);
}
break;
}
}
if (!nEventHandled)
{
HandleEvent(ev, RESOURCE_SCRIPT_CREATURE_CORE);
}
}
Other Script
void BHN_CheckNonPartyFollower(object oCousland,string sWaypoint)
{
object oArea = GetArea(oCousland);
int nNonPartyFollowers = GetLocalInt(oArea,AREA_COUNTER_1);
if(nNonPartyFollowers < 2)
{
nNonPartyFollowers = nNonPartyFollowers + 1;
SetLocalInt(oArea,AREA_COUNTER_1,nNonPartyFollowers);
//SET check for on death script
SetLocalInt(oCousland,CREATURE_DO_ONCE_A,TRUE);
AddNonPartyFollower(oCousland);
If I was to change it so that my people would follow me as nonpartymember, what parts should I modify to make it effective to my NPCs?
Modifié par AnnoyingDisplayName, 31 décembre 2009 - 07:24 .





Retour en haut






