Could you help me with these script? (follow_me))

I have many special criatures summed by “only power” item.but not join as Henchmen does.
But i would like they follow me as henchmen do, at distance, but they pile on me. :frowning:

I use this :

void main()

object oPC = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC, OBJECT_SELF, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN);

if (IsInConversation(OBJECT_SELF) || GetIsInCombat()) return;

ActionForceFollowObject(oPC);

}

These scripts rules the hechmas distance is :

#include “NW_I0_GENERIC”

void main()

  • SetAssociateState(NW_ASC_DISTANCE_2_METERS, FALSE);*
  • SetAssociateState(NW_ASC_DISTANCE_4_METERS);*
  • SetAssociateState(NW_ASC_DISTANCE_6_METERS, FALSE);*
    }

THANKS!!! :slight_smile:

I only work with NWN2, but I thought I could at least try to help. When you say “I use this”, is that the EXACT script you’re using? That shouldn’t compile in that case, since you don’t have a “{” after void main().

Couldn’t you just do something like this?

void main()
{

object oPC = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC, OBJECT_SELF, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN);

if (IsInConversation(OBJECT_SELF) || GetIsInCombat()) return;

ActionForceFollowObject(oPC,2.0f); //Summoned creature follows at a distance of 2 meters.

}

Thanks, guy! I will taste it :slight_smile:

Dont worry about { , i just make a rapid cut&paste, my script rules.
Thanks for yours :smiley:

Runs nice, thanks :smiley:

1 Like