Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Simulate VBSS, capture of enemy airport & vehicles

 
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 >> Simulate VBSS, capture of enemy airport & vehicles Page: [1]
Login
Message << Older Topic   Newer Topic >>
Simulate VBSS, capture of enemy airport & vehicles - 12/20/2019 3:58:41 PM   
TYHo

 

Posts: 67
Joined: 5/17/2016
Status: offline
Hi everyone, how would you use lua to simulate VBSS fast-roping onto a unfriendly vessel and taking control of it? E.g. helo remains in an area for 1min, and the vessel would than change to player side? Thanks!

< Message edited by TYHo -- 12/23/2019 10:27:30 AM >
Post #: 1
RE: Simulate VBSS - 12/21/2019 7:17:23 AM   
michaelm75au


Posts: 13500
Joined: 5/5/2001
From: Melbourne, Australia
Status: offline
You would need an action where the unit side was changed to capturing side.

ScenEdit_SetUnitSide({side=oldSide, Name=unitToChange, newside=newSide})


_____________________________

Michael

(in reply to TYHo)
Post #: 2
RE: Simulate VBSS - 12/21/2019 11:05:13 PM   
TYHo

 

Posts: 67
Joined: 5/17/2016
Status: offline
Thanks for replying! Would such a script be correct? For e.g.

ScenEdit_SetUnitSide(side='Iran', Name='Very Large Crude Carrier', newside='UK')

What parameters am I missing?

(in reply to michaelm75au)
Post #: 3
RE: Simulate VBSS - 12/22/2019 12:39:29 AM   
michaelm75au


Posts: 13500
Joined: 5/5/2001
From: Melbourne, Australia
Status: offline
That looks okay. However the name has to be unique for it to work properly.

_____________________________

Michael

(in reply to TYHo)
Post #: 4
RE: Simulate VBSS - 12/22/2019 12:56:09 AM   
michaelm75au


Posts: 13500
Joined: 5/5/2001
From: Melbourne, Australia
Status: offline
Also you can use the GUID of the actual unit in place of 'Name'
ScenEdit_SetUnitSide(oldside='Iran', guid='4503e1fa-b6be-43c0-87bf-a602dded4001', newside='UK')

< Message edited by michaelm75au -- 12/22/2019 3:44:54 AM >


_____________________________

Michael

(in reply to michaelm75au)
Post #: 5
RE: Simulate VBSS - 12/22/2019 3:44:50 AM   
Rory Noonan

 

Posts: 2816
Joined: 12/18/2014
From: Brooklyn, NY
Status: offline
This scenario I made a while back has pretty solid VBSS mechanics; you can also 'shoot out the engine' from Coast Guard helos to slow fast boats down.

https://www.matrixgames.com/forums/tm.asp?m=4690352

_____________________________


(in reply to michaelm75au)
Post #: 6
RE: Simulate VBSS - 12/22/2019 1:43:24 PM   
TYHo

 

Posts: 67
Joined: 5/17/2016
Status: offline
Thanks guys! Esp. apache85... I will take a look at your scenario and see I can figure out the LUAs through 'reverse engineering'!

(in reply to Rory Noonan)
Post #: 7
RE: Simulate VBSS - 12/23/2019 12:17:51 AM   
Rory Noonan

 

Posts: 2816
Joined: 12/18/2014
From: Brooklyn, NY
Status: offline
Let us know here if you need any help with it

_____________________________


(in reply to TYHo)
Post #: 8
RE: Simulate VBSS - 12/23/2019 10:23:46 AM   
TYHo

 

Posts: 67
Joined: 5/17/2016
Status: offline
Thanks for your patience and kind offer to help, mate! This old dog really has trouble learning new LUA tricks... Anyway I have attached a simple creation with objectives to capture enemy airport, tank, and vessel... can I trouble you to take a look and help me correct and improve the event LUA scripts? Thanks!

Attachment (1)

< Message edited by TYHo -- 12/23/2019 10:25:26 AM >

(in reply to Rory Noonan)
Post #: 9
RE: Simulate VBSS - 12/24/2019 5:40:04 AM   
Rory Noonan

 

Posts: 2816
Joined: 12/18/2014
From: Brooklyn, NY
Status: offline
There's only an .ini file in that zip, I'll need the .scen file to help

_____________________________


(in reply to TYHo)
Post #: 10
RE: Simulate VBSS - 12/24/2019 7:52:48 AM   
TYHo

 

Posts: 67
Joined: 5/17/2016
Status: offline
Oh yes... Oops! Here you go, thanks! And I looked through your scenario and noticed you used 'Special Action' extensively... I don't know how to link that to the Lua Trigger actually...

Attachment (1)

< Message edited by TYHo -- 12/24/2019 7:55:01 AM >

(in reply to Rory Noonan)
Post #: 11
RE: Simulate VBSS - 12/24/2019 9:10:20 AM   
Rory Noonan

 

Posts: 2816
Joined: 12/18/2014
From: Brooklyn, NY
Status: offline
I'm not able to look at the .scen file tonight (although I plan to tomorrow), but on Special Actions they are basically Lua scripts that are executed on demand. You can access them (in the editor) through Editor > Event Editor > Special Actions. They're side specifc, so keep that in mind. There is no trigger for them apart from the player activating them through the special action menu.

Very under-utilised in my opinion, nearly all of the scenarios I've made use at least one and often 4-5. I don't recall actually seeing them in any other scenarios though!

_____________________________


(in reply to TYHo)
Post #: 12
RE: Simulate VBSS - 12/24/2019 11:17:43 PM   
Whicker

 

Posts: 664
Joined: 6/20/2018
Status: offline
you are missing the curly brackets - and the air base one the name is incorrect:

ScenEdit_SetUnitSide({oldside='Red', Name='Building (Airport Terminal)', newside='Blue'})

you can run that in the lua console, move time forward and it should change. Then you can update the code in the action (after you reverse it to put it back).

On the helo one you can also check the speed and altitude to only do it if the helo is hovering and at low alt.

(in reply to Rory Noonan)
Post #: 13
RE: Simulate VBSS - 12/25/2019 3:48:53 AM   
TYHo

 

Posts: 67
Joined: 5/17/2016
Status: offline
Awesome Whicker, got it, Thanks! How do you 'force' the helo to be hovering at low alt? Set it as a Condition?

quote:

ORIGINAL: Whicker

you are missing the curly brackets - and the air base one the name is incorrect:

ScenEdit_SetUnitSide({oldside='Red', Name='Building (Airport Terminal)', newside='Blue'})

you can run that in the lua console, move time forward and it should change. Then you can update the code in the action (after you reverse it to put it back).

On the helo one you can also check the speed and altitude to only do it if the helo is hovering and at low alt.


(in reply to Whicker)
Post #: 14
RE: Simulate VBSS - 12/26/2019 5:46:36 AM   
Whicker

 

Posts: 664
Joined: 6/20/2018
Status: offline
I think you could do it as a condition, but you can just do it in the action itself.

I think the helo will trigger the action right? the unit that triggers an action is called UnitX and can be set to a variable:

local u = ScenEdit_UnitX ()

then you can test to see if u.altitude and or u.speed are equal to whatever you want them to be. If so then run your other code, if not then don't.

(in reply to TYHo)
Post #: 15
RE: Simulate VBSS - 12/27/2019 2:11:24 PM   
TYHo

 

Posts: 67
Joined: 5/17/2016
Status: offline
Thanks! I'll give it a try...

(in reply to Whicker)
Post #: 16
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> Simulate VBSS, capture of enemy airport & vehicles 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

0.625