Home   Help Search Login Register  

Author Topic: "UV" flare script  (Read 2920 times)

0 Members and 1 Guest are viewing this topic.

Offline KTottE

  • Former Staff
  • ****
"UV" flare script
« on: 09 Jul 2003, 21:24:49 »
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 :)
"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"

O Neil

  • Guest
Re:"UV" flare script
« Reply #1 on: 13 Jul 2003, 02:30:58 »
Yep, I'd have to say, it's pretty good ;)

O'Neil

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:"UV" flare script
« Reply #2 on: 16 Jul 2003, 21:57:05 »
It looks good, except for the fact that you can see the "UV" light! The point of a UV flare/strobe is that it can only be seen with NVGs, since they detect ultraviolet light, which is obviously beyond the visible light spectrum (unless you recently had cataracts surgery). I know it might be impossible to do in OFP, but a UV light should only be visible through NVGs, or else it is kinda pointless.

But perhaps this is possible using an addon? Would it be possible to make something that can only be viewed with NVG's via an addon? It might, but I know next to nothing about addon making, so I wouldn't be the one to ask. I do know that when you look at a light in OFP with NVG's, the bright "flare" around the light gets bigger. Perhaps this could be exploited in some way to make a light that is too small to see in regular night, but visible through NVGs?

Other than that, I think that a strobe effect would be a nice addition to this script, and possible the option to throw the flares (like in BHD).
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

O Neil

  • Guest
Re:"UV" flare script
« Reply #3 on: 16 Jul 2003, 23:49:56 »
...that's what UV ment... ;) ;) ;)

Mr_Shady

  • Guest
Re:"UV" flare script
« Reply #4 on: 17 Jul 2003, 00:10:28 »
The NVGs are just a colour overlay in OFP, so I don't think you could have things showing up just for people with NVGs on. It's still a handy script for MP missions though

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:"UV" flare script
« Reply #5 on: 17 Jul 2003, 09:02:54 »
O Neil:

I have no idea what you are trying to say.  ???

Kooky:

I really don't think NVGs are just a color overlay. They seem to increase the contrast between the terrain and certain objects. Put yourself in a town with a streetlight, and flip on and off your NVGs. Look real close, and you will see a couple of things. First off, the ground that is lit by the streetlamp will look exactly like the ground that is still dark (when the NVGs are on). If it were a simple overlay, the light area would still be lighter than the dark area. There are more things (such as rooftops getting darker under certain conditions, the sky looking much different, and more), but I won't get into them, as I think my point is proven already.

I think there is definately something else going on with NVGs, besides a simple color overlay, but there may not be any way to exploit it.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline KTottE

  • Former Staff
  • ****
Re:"UV" flare script
« Reply #6 on: 17 Jul 2003, 09:46:47 »
It's called a "UV" flare script with quotes for a reason ;)
There's no way of reproducing an UV effect that I know of, perhaps BAS have managed to do it for their SEALs, if so, I will take a look at it as soon as they are released.

The strobe-effect is something I will look into, but it might be hard since this work by doing an "this inFlame true" on the flare-object and I don't know how fast that can go, but we'll see.

And the NVG's are just a colour-overlay. They don't increase brightness and/or contrast at all. It's just a green overlay ontop of the screen.

I don't know about throwing it, then I probably would have to create an addon out of it to make it like a grenade to be thrown.
"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"

Mr_Shady

  • Guest
Re:"UV" flare script
« Reply #7 on: 17 Jul 2003, 16:19:36 »
A nice addition to this would be a simulated firefly light, could be done by shooting bright blue tracers or something. IRL they're used to signal to aircraft, but they can be risky to use behind enemy lines since they're visible with the naked eye.

Offline KTottE

  • Former Staff
  • ****
Re:"UV" flare script
« Reply #8 on: 17 Jul 2003, 17:30:44 »
I'll add that, as soon as you explain what on god's green earth they are.
"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:"UV" flare script
« Reply #9 on: 17 Jul 2003, 22:19:52 »
Okay, I've got a couple questions about the script. First off, what is that in the description.ext? Is that so in MP you can choose some parameters for the game (like in CTF missions, the "score to win"? I have no experience with MP editing, so sorry if that is a dumb question.

Secondly, what are "glowblue", "glowred" et. al? Are these objects that are normally in OFPR, or are they part of some addon that I have and don't know about?

And yes, you can make a strobe like effect. I made script that flashes red and blue lights on a police car, using lights I made and inflaming them. Each light lasts .2 seconds, and it works fine.

I'll post some pics of what I'm talking about with the NVGs later. I still think there is a little more to them besides just a color overlay.  :-*
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline KTottE

  • Former Staff
  • ****
Re:"UV" flare script
« Reply #10 on: 17 Jul 2003, 23:37:12 »
glowblue etc. are addons that ship with the BAS MH-47E and are essentially the light part of a streetlamp, which glows in said colour (blue, red, yellow a.s.o)

And, even if NVG's do change some other aspect of what you see, there's no way for us to fiddle with that afaik, so that's a no-go :)

And I'll look into the strobing effect as soon as I get back from visiting my girlfriend, which I should do some time on Sunday.

Oh, the description.ext stuff is so you can choose the colour of the flare and the time of day if you start it as an MP mission. As this is just a beta-test script to see:
1) If everything works
2) If anything should be done to it (strobing effect)

As it's not my addon, I'm not too keen on doing anything that involves creating an addon, but if it comes to that (I.E if it's possible to achieve a true UV effect) I'm willing to investigate that.
"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"