Jump to content

Recommended Posts

Posted

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?

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...