Setting waypoints?

All discussions & material related to Command's Lua interface

Moderators: angster, RoryAndersonCDT, michaelm75au, MOD_Command

Post Reply
User avatar
Gunner98
Posts: 6001
Joined: Fri Apr 29, 2005 12:49 am
Location: The Great White North!
Contact:

Setting waypoints?

Post by Gunner98 »

Hay guys

Trying to reset a units course. Situation is that at a trigger I reassign units on a non player side. The problem is that they keep on their plotted course until the end then do a recalculation and head to their new assigned mission area.

So I thought that if I used SetUinit I could assign a new course, when they go to the end of that they would recalculate and head off in the right direction.


Problem is that I cannot figure out the syntax for how to do that:


ScenEdit_SetUnit({guid='50dbf251-abd0-4561-9329-f0840149cdec', course:({waypoint= latitude='58.1923135808896', longitude='10.229358006151'})})


Is this the right way of doing what I'm trying to do? How should I format the command. There are only three units involved so I don't need anything too complex.


Thanks.


B
Check out our novel, Northern Fury: H-Hour!: http://northernfury.us/
And our blog: http://northernfury.us/blog/post2/
Twitter: @NorthernFury94 or Facebook https://www.facebook.com/northernfury/
Whicker
Posts: 665
Joined: Tue Jun 19, 2018 9:54 pm

RE: Setting waypoints?

Post by Whicker »

I *think* you can set course to {} and then the waypoints will be gone and it should move to its mission area.
User avatar
Gunner98
Posts: 6001
Joined: Fri Apr 29, 2005 12:49 am
Location: The Great White North!
Contact:

RE: Setting waypoints?

Post by Gunner98 »

Thank you - that works.

Cheers

B
Check out our novel, Northern Fury: H-Hour!: http://northernfury.us/
And our blog: http://northernfury.us/blog/post2/
Twitter: @NorthernFury94 or Facebook https://www.facebook.com/northernfury/
Post Reply

Return to “Lua Legion”