ffbj,
Thank you for your reply. He is still looking at me.
If this helps.
The NPC is spawned by the door you enter the area with.
This is the NPC's On Spawn.
void main()
{
object oPC = GetFirstPC();
object oCap = OBJECT_SELF;
object oDay = GetObjectByTag("LannesansArmor");
object oNig = GetObjectByTag("NW_MCLOTH015");
object oChair = GetObjectByTag("CapsChair");
object oSeat = GetObjectByTag("CapsSeat");
if(GetIsDay())
{
AssignCommand(oCap,ActionEquipItem(oDay,INVENTORY_SLOT_CHEST));
DelayCommand(0.5,AssignCommand(oCap,ActionMoveToObject(oSeat,FALSE)));
DelayCommand(2.0,AssignCommand(oCap,ActionSit(oSeat)));
DelayCommand(4.0,SetLocalInt(oPC,"ZZZZZ",2));
}
else
{
AssignCommand(oCap,ActionEquipItem(oNig,INVENTORY_SLOT_CHEST));
DelayCommand(0.5,AssignCommand(oCap,ActionMoveToObject(oChair,FALSE)));
DelayCommand(2.0,AssignCommand(oCap,ActionSit(oChair)));
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Effects That worked with a standing NPC where placed here
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
DelayCommand(4.0,SetLocalInt(oPC,"ZZZZZ",1));
}
}
This is the On Heartbeat.
void main()
{
object oPC = GetFirstPC();
object oTarget = OBJECT_SELF;
effect eSleep = EffectSleep();
effect eVis = EffectVisualEffect(VFX_IMP_SLEEP);
if(GetLocalInt(oPC,"ZZZZZ") == 3)//Busted
{
//End Heartbeat Actions
}
else
{
if(GetLocalInt(oPC,"ZZZZZ") == 2)//Awake Working
{
//Daytime Actions
}
else
{
if(GetLocalInt(oPC,"ZZZZZ") == 1)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget,8.0f);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Effects that where also placed here
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
}
}
}
}
I have removed all of the effects I tried on both of these scripts.I have found alot of ways to freeze an Npc. None of them work while they are sitting.
I entered this script On Heartbeat for the chair for testing.
void main()
{
object oChair = OBJECT_SELF;
object oAss = GetSittingCreature(oChair);
//effect ePar = EffectMovementSpeedDecrease(99);
if(GetLocalInt(oAss,"ZZZZZ") == 1)
{
if(GetIsObjectValid(oAss))
{
//This where I placed several effects for testing.
// It ain't ass would fire untill the Int was set.
// after that I'm doing.... fired,but not the effects.
/////////////////////////////////////////////////////////////////////
//ApplyEffectToObject(DURATION_TYPE_INSTANT,ePar,oAss,0.
;
//SpeakString("I'm doing what you told me. ",TALKVOLUME_TALK);
}
else
{
// SpeakString("What the Heck ?",TALKVOLUME_TALK);
}
}
else
{
// SpeakString("It aint Ass",TALKVOLUME_TALK);
}
}
the include x0_i0_anims was also used on these scripts. I don't know if that has anything to do with it, but I wanted to give you guys as much info as I could. As you can tell I am also using conditionals, because depending on the time of day the player enters, the NPC will be either sleeping or awake.
I'm moving on with the build (already spent about 20 hours on this problem), but am keeping the door open on this part.
Thanks again,
Ed