The documentation (http://commandlua.github.io/assets/Func ... tUnit.html) states that it takes a long/lat table as input.
course = {} of multiple
- latitude
longitude
It was a little unclear to me what the course input looks like exactly. After some investigation in available scenario scripts, I've found the actual form of the course input table.
It looks like this:
Code: Select all
destination = {}
wp = {longitude=desired_longitude,
Longitude=desired_longitude,
latitude=desired_latitude,
Latitude=desired_latitude}
table.insert(destination, wp)
upddated_unit = ScenEdit_SetUnit({side=unit_side, guid=unit.guid, course=destination})