Need help wth Lua

All discussions & material related to Command's Lua interface

Moderators: RoryAndersonCDT, michaelm75au, angster, MOD_Command

Post Reply
User avatar
Mgellis
Posts: 2468
Joined: Sat Aug 18, 2007 2:45 pm
Contact:

Need help wth Lua

Post by Mgellis »

All right, I've exhausted what little lua-fu I have. I need your help.

I am trying to create an event that tells a certain ship, when it is damaged, to come to a full stop. Basically, I'm handling a fishing dispute by having Blue do a small amount of damage to a ship that is running away (as opposed to sinking them, for which you lose points), which causes the fishing boat to give up and surrender and not run away anymore because the people on board are like, "Crap! They're serious! Cut the engines!"

I cannot figure out which lua command is used to give a ship orders (like "throttle should now be set to stop"). I have a attached a screenshot of the one I was using, but it is not working. I have looked at various lua documentation and I must be a dumb ass because I cannot figure out what I am doing wrong.

What am I doing wrong?

Thank you in advance.
Capture.JPG
Capture.JPG (34.84 KiB) Viewed 877 times
thewood1
Posts: 10410
Joined: Sun Nov 27, 2005 6:24 pm
Location: Boston

Re: Need help wth Lua

Post by thewood1 »

Did you look in the Lua Legion forum under mods? There is a lot of documentation, guides, etc. Plus a lot of people asking and answering questions.
Kushan04
Posts: 1271
Joined: Tue Jun 28, 2005 9:27 pm
Location: USA
Contact:

Re: Need help wth Lua

Post by Kushan04 »

You need to use either manualThrottle or ManualSpeed.

Manual Throttle Example

Code: Select all

ScenEdit_SetUnit({side='B', name='Boaty McBoat Face', manualThrottle='FullStop'})
Manual Speed Example

Code: Select all

ScenEdit_SetUnit({side='B', name='Boaty McBoat Face', manualSpeed=0})
Post Reply

Return to “Lua Legion”