npcs start looking to the left for no reason
sarevok57
Member Posts: 6,002
so for my NPCs i have them standing in place and have scripts set on heartbeat and on spawn to look at a certain object ( a waypoint )
once the player character spawns in, all is good, but then after a couple of rounds or so, then EVERY NPC starts looking towards the left
what gives? i'm not telling them to do that, plus there is nothing tagged over there for them to even look in that direction so i have no clue why it's doing this
once the player character spawns in, all is good, but then after a couple of rounds or so, then EVERY NPC starts looking towards the left
what gives? i'm not telling them to do that, plus there is nothing tagged over there for them to even look in that direction so i have no clue why it's doing this
0
Comments
I tried to make a script to do this on my own, and I'm not sure how it would be done. The only options I'm seeing are: ANIMATION_FIREFORGET_HEAD_TURN_LEFT, ANIMATION_FIREFORGET_HEAD_TURN_RIGHT and ANIMATION_LOOPING_LOOK_FAR.
void main()
{
// If running the lowest AI, abort for performance reasons.
if ( GetAILevel() == AI_LEVEL_VERY_LOW )
return;
// If busy with combat or conversation, skip this heartbeat.
if ( IsInConversation(OBJECT_SELF) || GetIsInCombat() )
return;
// Have us perform a sequence of actions.
ActionDoCommand(SetFacingPoint(GetPosition(GetNearestObjectByTag("goliron001"))));
}
with "goliron001" being changed for each way point they are supposed to look at or i suppose "face" would be the better term
now in the screenshots im about to show, when i come into the area they are doing as they are supposed to do, but then "x" amount of rounds later, they all face to the east for no reason so why is this? in fact ALL of the NPCs in the area are doing this
I deleted the the objects with the tag and tried again, and the creatures all turned and faced southwest-ish.
i had it set so if these golems were to wonder off, then they would come back to their way points
but apparently even if you script a creature to face a certain way, if they have a way point, then they will ALWAYS face east once they hit their way point
so what i had to do was instead of giving them way points was tell them to go to location "x" first, then face towards location "y" and now it is working 100% as i wanted in the first place