Page 1 of 1

Turning Radars On?

Posted: Wed Nov 20, 2019 9:31 pm
by 22sec
I’m new to Lua, and want to start creating scenarios that take advantage of what the code allows. I’m still trying to figure a lot out. How would I write a script to have a task force turn its radar on once enemy units are detected?

RE: Turning Radars On?

Posted: Wed Nov 20, 2019 10:20 pm
by Rory Noonan
Use a 'unit detected' trigger in an event with a Lua script action that uses the ScenEdit_SetEMCON function (https://commandlua.github.io/#ScenEdit_SetEMCON)

If you haven't already read them, these two articles provide a foundation for getting comfortable with Lua in Command.

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

RE: Turning Radars On?

Posted: Wed Nov 20, 2019 11:09 pm
by 22sec
Perfect! I’ve been trying to find as many good resources as possible.