Setting unit course with SE_SetUnit
Posted: Thu Feb 09, 2023 11:55 am
SE_SetUnit has a 'course' parameter.
The documentation (http://commandlua.github.io/assets/Func ... tUnit.html) states that it takes a long/lat table as input.
course = {} of multiple
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:
Hope this will be helpful for someone 
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})