Righto, I've pieced together a very simple script to simulate the UV flares/lights used by spec ops around the world. As seen in Black Hawk Down by the way, except this is a larger light and it's used to signal to helicopters to come pick you up.
What you need for this mission is the BAS MH47E (1.85 version and up).
I've included a small example mission, with radio-commands to let you change the mission in-mission to see the different effects.
What the script does:
Adds an action to your player.
When the action is called, it checks a variable to see which colour to use on the flare (GlowBlue, GlowRed, GlowWhite, GlowYellow, GlowGreen, GlowFire) and also what time of day it is. If it is between 0600 and 1900 it will create a green smokegrenade instead of a glow-object (glows are hard to see at daytime).
It creates and inflames the selected Glow-object, and then deletes the action from the player, so he can't spam the map with flares. After 120 seconds the glow-object is deleted and the action is returned to the player.
I've included a small snippet to keep people from setting off eachother's actions, and also, everyone's flare will be removed when one is set off. This is because the script is done now to use for only one group, so I didn't want everyone placing a flare at the same time
What you need to do in order to get it to work:
Load the example mission
Or if you want to do it yourself, and have the same functionality as the sample mission (I.E radio to switch things around)
- Copy UVLight.sqs to your mission folder
- Add an action to a player (unitName addAction ["action-name", "UVLight.sqs"])
- Create one trigger, make it activated repeatedly and by one of the radio-signals. I suggest changing the text to something easy to understand. At OnActivation enter: "skipTime 01" (hop forward one hour)
- Repeat the previous step except select another radio signal and put "skipTime -01" in the OnActivation field (hop backwards one hour)
- Place a radio trigger, name it approrpiately, and in the OnActivation put: Param2 = 10#, where # is a number between 1 and 6 (explained at the bottom)
- Repeat previous step until you have all the numbers between 101 and 106 in radio triggers.
101 = Blue
102 = Red
103 = White
104 = Yellow
105 = Green
106 = Fire
Suggestions are always welcome