Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Lua Script help to simulate infantry escaping in a certain direction

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> Lua Script help to simulate infantry escaping in a certain direction Page: [1]
Login
Message << Older Topic   Newer Topic >>
Lua Script help to simulate infantry escaping in a cert... - 10/7/2017 5:40:46 PM   
TYHo

 

Posts: 67
Joined: 5/17/2016
Status: offline
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!

< Message edited by TYHo -- 10/7/2017 5:41:55 PM >
Post #: 1
RE: Lua Script help to simulate infantry escaping in a ... - 10/12/2017 8:13:04 PM   
somi83


Posts: 59
Joined: 2/6/2016
From: Novi Sad, Serbia
Status: offline
Hi,

For action use this code:
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. 
})

(in reply to TYHo)
Post #: 2
RE: Lua Script help to simulate infantry escaping in a ... - 10/13/2017 2:51:06 PM   
TYHo

 

Posts: 67
Joined: 5/17/2016
Status: offline
Thanks for your help, I'll try it out!

(in reply to somi83)
Post #: 3
RE: Lua Script help to simulate infantry escaping in a ... - 10/13/2017 3:32:42 PM   
Gunner98

 

Posts: 5508
Joined: 4/29/2005
From: The Great White North!
Status: offline
quote:

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

< Message edited by Gunner98 -- 10/13/2017 3:33:11 PM >

(in reply to somi83)
Post #: 4
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> Lua Script help to simulate infantry escaping in a certain direction Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

3.641