Thats the magic of the tabs in the conv=[conversation scrpt.] In your conv if you look to the bottom right you will see some tabs. Text appears when... and action taken. this tab is there for the npc talking and the player characters reply.
kid[npc red color] Hi did you know we have criters in these woods...
player[pc blue color] Yeah I know about the creatures kid...
player[pc blue color] No what creatures...for ease have the below script fire or" action taken" tab here.
// crtr_goblin
void main()
{
int a;
object oPC = GetPCSpeaker();
// "kid tag here"
object oKid = GetObjectByTag("NW_MALEKID01");
/////////////////////////////////////////////////////////////////
// creat goblin location based on oTarget from lexicon
// stalker script (but in an NPC's OnHeartbeat script)
// supplied by Cheiron
object oTarget=oKid;// oPC;//oKid;
object oArea = GetArea(oTarget);
vector vPosition = GetPosition(oTarget);
float fOrientation = GetFacing(oTarget);
// this is where AngleToVector shows it's powers!!
vector vNewPos = AngleToVector(fOrientation);
// creates random effect location to be created at.
float fRndmX = IntToFloat( Random(1) );
float fRndmY = IntToFloat( Random(1) );
// you need to adjust the - or + to get the effect you want.
float vX = vPosition.x + fRndmX;
float vY = vPosition.y + fRndmY;
float vZ = vPosition.z;
vNewPos = Vector(vX, vY, vZ);
location lLocation = Location(oArea, vNewPos, fOrientation);
// you can use nwn goblin ResRef "nw_goblina" or create one "ResRef of gob"
object oGoblin = CreateObject(OBJECT_TYPE_CREATURE,"nw_goblina",lLocation);
//////////////////////////////////////////////////////////
// if you use nwn goblin YOU MUST do below script
// ClearPersonalReputation(oPC,oGoblin);
AssignCommand(oGoblin, ClearAllActions(TRUE));
// Change NPC to Commoner Faction so no longer hostile
ChangeToStandardFaction(oGoblin, STANDARD_FACTION_COMMONER);
}