Can this be done in Lua - issue commands to neutrals?

All discussions & material related to Command's Lua interface

Moderators: RoryAndersonCDT, michaelm75au, angster, MOD_Command

Post Reply
jarraya
Posts: 339
Joined: Mon Sep 10, 2007 4:04 pm

Can this be done in Lua - issue commands to neutrals?

Post by jarraya »

I am trying to design a scenario where BLUE is to issue commands to another ship - a neutral unit.

Think of Persian Gulf, NATO vessel ordering a neutral tanker to turn to a heading and change speed.

Can this be done?

- Player selects unit
- player uses Scenario Options to select "give order"
- Player enters course and speed
- Unit follows orders

Thanks to the experts in advance!
Parel803
Posts: 962
Joined: Thu Oct 10, 2019 3:39 pm
Location: Netherlands

RE: Can this be done in Lua - issue commands to neutrals?

Post by Parel803 »

Not sure but Apache might made in the Seventh District Vice scenario with a special action. So you can board the vessel.
User avatar
TitaniumTrout
Posts: 469
Joined: Mon Oct 20, 2014 9:06 am
Location: Michigan

RE: Can this be done in Lua - issue commands to neutrals?

Post by TitaniumTrout »

Few ways, one, special action as Parel803 mentioned. Probably the easiest but least flexible.

You can use something like https://commandlua.github.io/#ScenEdit_InputBox ScenEdit_InputBox but you'd have to do some error checking to make sure you get a valid entry from the player. Otherwise when you say "Enter the heading please" someone could reply with "banana" and your trigger wouldn't do anything.
Post Reply

Return to “Lua Legion”