Fallen Guardian Posted March 5, 2012 Share Posted March 5, 2012 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 More sharing options...
Istorian Posted March 5, 2012 Share Posted March 5, 2012 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 More sharing options...
Fallen Guardian Posted March 5, 2012 Author Share Posted March 5, 2012 Man, I make some bad mistakes sometimes. Thanks Istorian. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.