I would like to do some actions to NPC (move to, open door, unlock door) and it can not be stopped (talking or object in front).
Example: you talked to the NPC and he has already started to do some actions, but he can not be stopped because the actions are canceled (he must finish all).
other bad is if someone is in front, the action is canceled, can not have anyone else in their way (even an object)
the NPC has 4 waypoints to walk random so whatever script action will be canceled to walk to this waypoints, so we need remove the AI (artificial inteligence) for a time (temporary)
I made a script, but is still in trouble
/////////////////////////////////////////////////////////////////////////
void main()
{
if(GetArea(OBJECT_SELF) == GetArea(GetObjectByTag("WP_CarmemWalk_006")))
{
object oDoor1 = GetObjectByTag("Door_TavdaEstr_Out");
object oDoor2 = GetObjectByTag("Door_ArredNefTum_In");
if (GetObjectType(oDoor1) == OBJECT_TYPE_DOOR && GetObjectType(oDoor2) == OBJECT_TYPE_DOOR && GetLocked(oDoor2))
{
SetAILevel(OBJECT_SELF, AI_LEVEL_VERY_LOW);
DelayCommand(85.0, SetAILevel(OBJECT_SELF, AI_LEVEL_DEFAULT));
ActionMoveToObject(GetObjectByTag("WP_CarmemWalk_000"), TRUE);
ActionMoveToObject(GetObjectByTag("WP_CarmemWalk_0001"), TRUE);
ActionMoveToObject(GetObjectByTag("WP_CarmemWalk_001"), TRUE);
ActionMoveToObject(GetObjectByTag("WP_CarmemWalk_002"), TRUE);
ActionMoveToObject(GetObjectByTag("WP_CarmemWalk_003"), TRUE);
ActionMoveToObject(GetObjectByTag("WP_CarmemWalk_004"), TRUE);
ActionMoveToObject(GetObjectByTag("WP_CarmemWalk_005"), TRUE);
ActionUnlockObject(oDoor2);
ActionOpenDoor(oDoor2);
ActionWait(10.0);
ActionMoveToObject(GetObjectByTag("WP_CarmemWalk_006"), TRUE);
return;
}
FloatingTextStringOnCreature ("Door already opened", GetPCSpeaker());
return;
}
FloatingTextStringOnCreature ("Carmem invalid area", GetPCSpeaker());
return;
}
/////////////////////////////////////////////////////////////////////////