How to use LUA to simulate VBSS & capture of unfriendly vessel? (Full Version)

All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series



Message


TYHo -> How to use LUA to simulate VBSS & capture of unfriendly vessel? (12/21/2019 6:04:15 AM)

Hi everyone, how would you use lua to simulate VBSS on to a unfriendly vessel and taking control of it? E.g. helo remains in an area for 1min, and the vessel would then change to player side? Thanks!




Shkval25 -> RE: How to use LUA to simulate VBSS & capture of unfriendly vessel? (12/21/2019 9:50:12 PM)

You can make an event trigger(s) for a particular helicopter in the event editor, no Lua required. You'll need to create three or more markers around the target ship and set them to be locked to that ship. This creates a zone around the ship that will move with it. Having a unit change sides is one of the Lua commands in the drop-down menu after you've created a Lua-type action. Just select that command, hit "add" and it will appear in the text field. Just replace the placeholder with the name of the target ship and you're done.




TYHo -> RE: How to use LUA to simulate VBSS & capture of unfriendly vessel? (12/21/2019 11:29:07 PM)

Thanks for your help! Fixing the reference point on the vessel is exactly what I need! Now to figure out how to write the Action script for changing sides...




thewood1 -> RE: How to use LUA to simulate VBSS & capture of unfriendly vessel? (12/21/2019 11:40:00 PM)

I think there is an example of that actual statement in the Lua documentation.




TYHo -> RE: How to use LUA to simulate VBSS & capture of unfriendly vessel? (12/21/2019 11:54:31 PM)

Yep, I saw that, but I can't seem to get it right...

ScenEdit_SetUnitSide(side='Iran', Name='Commercial Tanker - Very Large Crude Carrier [300,000t DWT]', newside='UK')

What parameters am I missing?




michaelm75au -> RE: How to use LUA to simulate VBSS & capture of unfriendly vessel? (12/22/2019 12:57:43 AM)

ScenEdit_SetUnitSide(oldside='Iran', Name='Commercial Tanker - Very Large Crude Carrier [300,000t DWT]', newside='UK')




thewood1 -> RE: How to use LUA to simulate VBSS & capture of unfriendly vessel? (12/22/2019 2:26:51 AM)

btw, there is an entire sub-forum for Lua advice and questions in the mod section.




TYHo -> RE: How to use LUA to simulate VBSS & capture of unfriendly vessel? (12/22/2019 1:41:46 PM)

Thanks for helping, everyone! Sorry I double-posted bcos I think less ppl may visit the Lua Legion sub-forum, and I was getting impatient waiting for responses. I will continue this topic there then. Moderators, pls delete this thread if necessary. Thanks! [&o]




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
4.984375