Lua Script help to simulate infantry escaping in a certain direction

All discussions & material related to Command's Lua interface

Moderators: RoryAndersonCDT, michaelm75au, angster, MOD_Command

Post Reply
TYHo
Posts: 67
Joined: Tue May 17, 2016 2:37 pm

Lua Script help to simulate infantry escaping in a certain direction

Post 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!
User avatar
somi83
Posts: 59
Joined: Sat Feb 06, 2016 12:59 pm
Location: Novi Sad, Serbia

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

Post 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. 
 })
TYHo
Posts: 67
Joined: Tue May 17, 2016 2:37 pm

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

Post by TYHo »

Thanks for your help, I'll try it out! [:)]
User avatar
Gunner98
Posts: 5951
Joined: Fri Apr 29, 2005 12:49 am
Location: The Great White North!
Contact:

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

Post 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
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”