Page 1 of 1

Lua Script help to simulate infantry escaping in a certain direction

Posted: Sat Oct 07, 2017 2:40 pm
by TYHo
Hi guys, I am trying to simulate enemy infantry escaping in a certain direction when they spotted my air assault troops approaching.

The trigger would probably be my choppers entering the designated area, but how do I simulate enemy infantry escaping in a certain direction using lua? Thanks!

RE: Lua Script help to simulate infantry escaping in a certain direction

Posted: Thu Oct 12, 2017 5:13 pm
by somi83
Hi,

For action use this code:

Code: Select all

local unit = ScenEdit_SetUnit({
 side = '', --between quotes type in the side of the unit you want to move 
 name = '', --between quotes type in the name of the unit you want to move 
 course = { {latitude=' ', longitude=' '} }, -- for longitude and latitude chose location you want them to move, and type it in. 
 })

RE: Lua Script help to simulate infantry escaping in a certain direction

Posted: Fri Oct 13, 2017 11:51 am
by TYHo
Thanks for your help, I'll try it out! [:)]

RE: Lua Script help to simulate infantry escaping in a certain direction

Posted: Fri Oct 13, 2017 12:32 pm
by Gunner98
for longitude and latitude chose location you want them to move, and type it in

Its far better and easier to click on the map (where you want them to move to) hit 'Ctrl+x' then paste the Lat/long into the code.

B