Simple fix for a simple script?
GruffbaneJoe
Member Posts: 39
Based on a vault tutorial, I wrote this script to make a farmer NPC walk to one waypoint, act like she's planting something, then walk to the second waypoint and do the same...over and over. It compiles ok but she hardly ever does the animation. I think I must be missing a command for the que or something?
void main()
{
{ object oTarget = GetNearestObjectByTag("WP_WPLANTER1_01");
ActionMoveToObject(oTarget); ActionPlayAnimation(ANIMATION_LOOPING_GET_LOW, 1.0, 2.0);
}
{ object oTarget = GetNearestObjectByTag("WP_WPLANTER1_02");
ActionMoveToObject(oTarget); ActionPlayAnimation(ANIMATION_LOOPING_GET_LOW, 1.0, 2.0);
}
}
void main()
{
{ object oTarget = GetNearestObjectByTag("WP_WPLANTER1_01");
ActionMoveToObject(oTarget); ActionPlayAnimation(ANIMATION_LOOPING_GET_LOW, 1.0, 2.0);
}
{ object oTarget = GetNearestObjectByTag("WP_WPLANTER1_02");
ActionMoveToObject(oTarget); ActionPlayAnimation(ANIMATION_LOOPING_GET_LOW, 1.0, 2.0);
}
}
0
Comments
Actually it acts like, get the waypoint, walk to and then act. But wile the npc acts, the script searched for the next, goes to and wants to act (and so on)...
https://neverwintervault.org/project/nwn1/script/axe-murderers-killer-walk-waypoints-axe