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:
@@ -6,55 +6,11 @@
|
||||
#include "NW_I0_GENERIC"
|
||||
void main()
|
||||
{
|
||||
int nMatch = GetListenPatternNumber();
|
||||
object oShouter = GetLastSpeaker();
|
||||
object oIntruder;
|
||||
if (nMatch == -1 && GetCommandable(OBJECT_SELF))
|
||||
{
|
||||
ClearAllActions();
|
||||
}
|
||||
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();
|
||||
|
||||
string sWay = "NW_STOP";
|
||||
object oWay = GetRandomObjectByTag(sWay, 110.0);
|
||||
ActionMoveToObject (oWay, FALSE);
|
||||
|
||||
}
|
||||
DelayCommand(GetRandomDelay(180.0, 300.0), ExecuteScript("re_rndwayp_go", OBJECT_SELF));
|
||||
object oWalk = GetRandomObjectByTag("CityNoble", 50.0);
|
||||
ActionForceMoveToObject (oWalk, FALSE, 1.0f, 120.0f);
|
||||
int nTime = Random(60) + 60;
|
||||
float fTime = IntToFloat(nTime);
|
||||
DelayCommand(fTime, ExecuteScript("re_rndwayp_go", OBJECT_SELF));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user