Jump to content

Home

ActionMoveAwayFromObject


Recommended Posts

So I've been attempting to use this script:

 

void main()
{

object oFleeFrom = GetObjectByTag("n_doha");

int bRun=FALSE

 AssignCommand(OBJECT_SELF, ActionMoveAwayFromObject(oFleeFrom, bRun, fMoveAwayRange=20.0f));

}

 

to make NPC's move away from a certain person. However, it says I have a syntax error at AssignCommand.

 

What am I doing wrong?

Link to comment
Share on other sites

Well, you forgot a semicolon after assigning FALSE the bRun variable, and there shoudn't be an expression inside the ActionMoveAwayFromObject command. ;) So, the correct script would be this:

 

void main()
{

object oFleeFrom = GetObjectByTag("n_doha");

int bRun=FALSE;

 AssignCommand(OBJECT_SELF, ActionMoveAwayFromObject(oFleeFrom, bRun, 20.0f));

}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...