hamza_Khan Posted Saturday at 05:10 PM Posted Saturday at 05:10 PM I am trying to send group to a random waypoint after a certain amount of time based on random flag. i.e after every 2 minutes, generate a random flag value, then send the unit to said waypoint based on flag value, if there are 10 waypoints, flag value in generated between 1 and 10 i am using the following script local randPoint = trigger.misc.getUserFlag(1) local g = Group.getByName("Patrol-1") local c = g:getController() local goToWaypointTask = { ["id"] = 'goToWaypoint', ["params"] = { ["fromWaypointIndex"] = 0, ["goToWaypointIndex"] = randPoint, } } c:pushTask(goToWaypointTask) I get an error "unknown task goToWaypoint" what am i doing wring?
Recommended Posts