I wrote my own script this time, but it didn't work out so well. I attempted make an NPC move to a certain waypoint.
void main()
{
object oExarKun=GetObjectByTag("exarkun");
object oWP=GetObjectByTag("walk");
location 1Destination = GetLocation(oWP);
AssignCommand(oExarKun,ActionMoveToLocation(1Desti nation,FALSE);
}
I get a syntax error when I try to compile it.
walk.nss(5): Error: Syntax error at "integer constant"
walk.nss(6): Error:Syntax error at "Destination"
Anyhelp with this would be appreciated.
Try this;
void main () {
object oNPC=GetObjectByTag("exarkun");
AssignCommand(oNPC, ClearAllActions());
AssignCommand(oNPC, ActionForceMoveToLocation(GetLocation(GetObjectByT ag("walk", 0)), 0));
EDIT: There shouldn't be a space in 'Tag' I have no idea why it's showing like this but just remove the space.
I wrote my own script this time, but it didn't work out so well. I attempted make an NPC move to a certain waypoint.
void main()
{
object oExarKun=GetObjectByTag("exarkun");
object oWP=GetObjectByTag("walk");
location 1Destination = GetLocation(oWP);
AssignCommand(oExarKun,ActionMoveToLocation(1Desti nation,FALSE);
}
I get a syntax error when I try to compile it.
walk.nss(5): Error: Syntax error at "integer constant"
walk.nss(6): Error:Syntax error at "Destination"
Anyhelp with this would be appreciated.
Shouldn't it be lDestination instead of 1Destination?
void main()
{
object oExarKun=GetObjectByTag("exarkun");
object oWP=GetObjectByTag("walk");
location lDestination = GetLocation(oWP);
AssignCommand(oExarKun,ActionMoveToLocation(lDesti nation,FALSE));
}
The script complies fine when i changed that.
Yes! I got it to compile! Thanks guys!