I figured out why commoner types weren't using civilized animations
Most changes were due to that and other behaviors I wanted ambient npcs to do.
This commit is contained in:
@@ -4,59 +4,18 @@
|
||||
/*Goes on the OnSpawn and OnConversation script of the NPC that you want to stay <span class="highlight">seated</span>*/
|
||||
#include "nw_i0_spells"
|
||||
#include "NW_I0_GENERIC"
|
||||
#include "x0_i0_anims"
|
||||
void main()
|
||||
{
|
||||
int nMatch = GetListenPatternNumber();
|
||||
object oShouter = GetLastSpeaker();
|
||||
object oIntruder;
|
||||
if (nMatch == -1 && GetCommandable(OBJECT_SELF))
|
||||
{
|
||||
ClearAllActions();
|
||||
//BeginConversation();
|
||||
}
|
||||
else
|
||||
if(nMatch != -1 && GetIsObjectValid(oShouter) && !GetIsPC(oShouter) && GetIsFriend(oShouter))
|
||||
{
|
||||
if(nMatch == 4)
|
||||
{
|
||||
oIntruder = GetLocalObject(oShouter, "NW_BLOCKER_INTRUDER");
|
||||
}
|
||||
else if (nMatch == 5)
|
||||
{
|
||||
oIntruder = GetLastHostileActor(oShouter);
|
||||
if(!GetIsObjectValid(oIntruder))
|
||||
{
|
||||
oIntruder = GetAttemptedAttackTarget();
|
||||
if(!GetIsObjectValid(oIntruder))
|
||||
{
|
||||
oIntruder = GetAttemptedSpellTarget();
|
||||
if(!GetIsObjectValid(oIntruder))
|
||||
{
|
||||
oIntruder = OBJECT_INVALID;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
RespondToShout(oShouter, nMatch, oIntruder);
|
||||
}
|
||||
|
||||
if(GetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT))
|
||||
{
|
||||
SignalEvent(OBJECT_SELF, EventUserDefined(1004));
|
||||
}
|
||||
if(GetCommandable(OBJECT_SELF))
|
||||
{
|
||||
//{
|
||||
//BeginConversation();
|
||||
//}
|
||||
ClearAllActions();
|
||||
int nChair = 1;
|
||||
string sMyTagName = GetTag(OBJECT_SELF);
|
||||
SetAILevel (OBJECT_SELF, AI_LEVEL_HIGH);
|
||||
string sSittableTagName = "Woodenbench";
|
||||
object oChair = GetRandomObjectByTag(sSittableTagName, 110.0);
|
||||
ActionMoveToObject (oChair, FALSE);
|
||||
object oChair = GetRandomObjectByTag(sSittableTagName, 100.0);
|
||||
ActionForceMoveToObject (oChair, FALSE, 1.0f, 120.0);
|
||||
ActionSit(oChair);
|
||||
}
|
||||
DelayCommand(GetRandomDelay(200.0, 280.0), ExecuteScript("npc_sit_woodenbe", OBJECT_SELF));
|
||||
int nTime = Random(210) + 90;
|
||||
float fTime = IntToFloat(nTime);
|
||||
DelayCommand(fTime, ExecuteScript("npc_sit_woodenbe", OBJECT_SELF));
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user