LUA Special Action help
Posted: Wed Sep 20, 2023 3:55 am
I've been playing around with the concept of players having the option to customise their forces at the start of a scenario via Special Actions. I don't have an issue with units like aircraft on bases/ships as I used the Ford Showcase Special Action LUA as a baseline to get a code that works.
What I am unsure of is the best way to allow players to use Special Actions to choose vessels. This is especially the case when it comes to customised ships, such as those with modified weapons, sensors, comms links etc. Therefore, I'm curious if there's a way to spawn in a unit from a Delta file via LUA?
Alternatively, a lesser solution that I'm aware may work is using Special Action LUA to trigger an Events Editor Action teleport, followed by a LUA command that kills the units that weren't picked. However, I have a couple of issues with this solution, the main one being that I can't work out how to get a Special Action to count as a Trigger.
Any help would be much appreciated!
What I am unsure of is the best way to allow players to use Special Actions to choose vessels. This is especially the case when it comes to customised ships, such as those with modified weapons, sensors, comms links etc. Therefore, I'm curious if there's a way to spawn in a unit from a Delta file via LUA?
Alternatively, a lesser solution that I'm aware may work is using Special Action LUA to trigger an Events Editor Action teleport, followed by a LUA command that kills the units that weren't picked. However, I have a couple of issues with this solution, the main one being that I can't work out how to get a Special Action to count as a Trigger.
Any help would be much appreciated!