Jump to content
Lala14

[Release] Red Light inside of Chopper

Recommended Posts

Originally a request by DarkXess to create a Red light that would appear inside helicopters

Released to everyone for who ever would like to use or modify

Please do note that I do not plan on updating this script as I believe that it will not require updates unless something happens in the future, i.e. script command changes

if you are to modify this script please credit Me(Lala) and/or Tajin

Idea came from DarkXess

Usage FOR Update 4

Either use in a vehicle's init:

null = [this] execVM "redlight.sqf";

or in the init.sqf

{[_x] execVM "redlight.sqf"}forEach vehicles;

Usage FOR V1.5+

init.sqf:

null = [] execVM "IntLight.sqf";

If there are any issues I can update the script to fix any of these issues but I highly doubt there will be any.

Test Mission

Interior_Lighting_Example.Stratis

Change Log



Update 1:

-Added Support for APC's

-Added option for normal light when using light point

Update 2:

-Added option for Green Light (fullerpj request)

-Added Support for C-130J_base vehicles

-Only specific vehicles will now get the action

-Only between specfic times now you get the "Interior Light On"

Update 3:

-On request I also added for lightpoint an option to make colours change every 0.1 seconds

Update 4:

-Added support for MH-47E and C17A3

-Hopefully have fixed #lightpoint not creating for everyone in multiplayer

V1.5: (yes I know we have gone backwards)

-Credit to Tajin for changing the whole script to make it more efficient and better looking for ground vehicles plus easier to config other vehicles

-Due to the new update you can only use to execute it nul = [] execVM "IntLight.sqf" in the init.sqf

-Removed restrictions so anyone in a vehicle can turn the light on and at any time

-Land vehicles will not have light protruding from them anymore Credit to Tajin

V1.61:

-Added the ability to change colour of lighting interior (currently only RED/GREEN)

-Added a 4th option to the arrays (allow light change)

-Added new action to change the lights

-Added MRAPS

-Added Option to only allow Crew to change colour (IL_crew_Only)

-Added Civilian Vehicles (Includes FIA)

V1.62:

-Added option to allow for Green light if it was left on when light turned off

-Fixed bug that I can't remember

-Changed how the Change light action name is controlled, less buggy

V1.63:

-Potential Fix for lights action name

-Added HAFM Helos

-Please also note wit HAFM Helo's, the UH-1H's front glass is really reflective of the interior light

-I think there was one more thing, can't remember

V1.64:

-Fixed error popping up when in a vehicle that is not listed in the array

-Added cockpit lights to all the transport/ammo/repair/fuel trucks for all factions

V1.65:

-Added 3 new variables (IL_Action_Night, IL_Debug, IL_Balls)

-Added new function to use allTurrets to allow gunners in choppers to be able to control the lights now in IL_Crew_Only

-Added the new DLC Choppers

-Added a new OPTIONAL parameter to the IL_config at the end to be able to define which lights you would like to be able to change

-Removed HintC, now using systemChat messages

-Added IL_Loaded variable

-Minor code improvements

V1.651:

-Added More lights to the MI-290 Medical

-Added lights to the Tauro Medical/Transport pods as well

-Fixed spelling mistake in debug

-Minor Light position changes to the MI-290 Transport

V1.653:

-Added Lights to most, if not all RHS vehicles.

-Fixed issue when the script is reinitialised you keep getting more TURN ON addactions (discovered from addons)

-Added some more debug information

-Added more isNil checks in the script

-Added "sab_an2_BASE", "SAB_C130_J_Base", "ADF_S70A_base_F", "ADF_ASLAV_BASE_F"

Screenshots credited to DarkXess and Me

fg2_zpsc6c02cf9.jpg

fg1_zpsdf4ac58f.jpg

http://i.imgur.com/sX7qmII.jpg (386 kB)



credit to pickinthatbanjo for the video

Download

news_download_a3_3.png

Interior Lighting V1.653

dropbox-logo.png

Interior Lighting V1.653

Edited by Lala14
add video by pickinthatbanjo

Share this post


Link to post
Share on other sites

Here you go matey, some screenshots for your release thread.

fg1_zpsdf4ac58f.jpg

fg2_zpsc6c02cf9.jpg

Already contacted Fox for the release too. Thanks again :)

Share this post


Link to post
Share on other sites

Updated added in APC's and The NATO MBT (M2A1 & M2A4 UP)

Also added option if using lightpoint to have the light not red and just standard ;)

Share this post


Link to post
Share on other sites

Thx for the script and the idea! Give a try...

Share this post


Link to post
Share on other sites

Updated version frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Really nice one. Would definately use it if it was compatible with vehicles spawned via ZEUS or VVS.

I think the "problem" is that it only checks for vehicles on mission start (vehicles that are allready on the map placed via Editor)

Share this post


Link to post
Share on other sites
Really nice one. Would definately use it if it was compatible with vehicles spawned via ZEUS or VVS.

I think the "problem" is that it only checks for vehicles on mission start (vehicles that are allready on the map placed via Editor)

Yes this is correct, I am not really sure on how I could make it so that vehicles that you place down automatically execute this. But if you can do "nul = [this] execVM "redlight.sqf";" in the vehicles init if you can access that in ZEUS. Never really used ZEUS to do this. I will start looking into this too because its also a sort of issue for my IR strobe script

Share this post


Link to post
Share on other sites

Hey bud it is a good script but I found it to be only client side visible and it doesn't work correctly in a multi-player game is there any way to get it to work so that it activates for everyone?

Share this post


Link to post
Share on other sites

Updated version frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Edited by Foxhound
updated to latest version

Share this post


Link to post
Share on other sites

Do you think you could do something in a way with this and add a green light for jumping?

Share this post


Link to post
Share on other sites
Do you think you could do something in a way with this and add a green light for jumping?

There is an option to make the light/chemlight green

Hey bud it is a good script but I found it to be only client side visible and it doesn't work correctly in a multi-player game is there any way to get it to work so that it activates for everyone?

Thanks, I discovered this with #lightpoint, I am investigating this but the chemlight works fine in multiplayer.

Well I'm actually not to sure no how to fix the #lightpoint, it seems to only create it locally, I've tried using publicVariables, changing the name to a global value and still, no luck. :mad:

Edited by Lala14

Share this post


Link to post
Share on other sites

I've decided to switch the calling of the script by making it use BIS_FNC_MP to hopefully combat the issue currently present with the creation of the #lightpoint, additionally I will be releasing the option to use some more mod vehicles :) C17A3 and the MH-47E

EDIT

Can Confirm now the MP compatibility for the #lightpoint is working as should.

Edited by Lala14

Share this post


Link to post
Share on other sites

This is great work buddy. Thanks. I may add this to the SOAR MOD, with creds to you guys Ofcourse ;) solid work

Share this post


Link to post
Share on other sites

How would I go and add compatibility to my vehicles?

Share this post


Link to post
Share on other sites
There is an option to make the light/chemlight green

I see what you mean but I was wanting the ability to have two addactions for two lights to switch between

Share this post


Link to post
Share on other sites
How would I go and add compatibility to my vehicles?

Go to lines 88-103 and place your vehicle in there, hopefully you understand what is happening there. if (_this iskindof "yourvehicletype) then { _pos [attachto co-ords]; };

Then go to lines 13 (for air) or line 19 (for land) and place your vehicle as (_obj iskindof "yourvehicletype") OR

This is great work buddy. Thanks. I may add this to the SOAR MOD, with creds to you guys Ofcourse ;) solid work

You have my permission to do so

I see what you mean but I was wanting the ability to have two addactions for two lights to switch between

i'll put this in as an option in the next update

Share this post


Link to post
Share on other sites

I think you'd be better off to have all these effects displayed only locally. That way it has less impact on the performance and you don't have to worry about locality issues as much.

The only public part should be a variable for each vehicle that defines if the lights are turned on or off.

The other advantage of that would be that you dont specifically have to add it for each vehicle. It could be set up to simply check the class of the vehicle youre currently in.

Edit: [a while later]

I took the liberty of rewriting it, I just haven't had a chance to test it yet. I'll get back when I tested it. :)

Should be a lot easier to handle though, here's how the config looks now:

// config ["kindOf classnames",[["position in modelspace","lightcolor","attentuation","intensity"],[..] ] ]
IL_config = [
[["Heli_Light_01_base_F"], [
	 [ [0,1,0.5], IL_c_red, IL_attentuation, IL_intensity ]
]],
[["Heli_Transport_01_base_F"], [
	 [ [0,2,0], IL_c_red, IL_attentuation, IL_intensity ]
]],
[["I_Heli_light_03_unarmed_base_F","I_Heli_light_03_base_F","I_Heli_light_03_F","I_Heli_light_03_unarmed_F"], [
	 [ [0,2.5,0.5], IL_c_red, IL_attentuation, IL_intensity ]
]],
[["Heli_Transport_02_base_F"], [
	 [ [0,1.5,-0.4], IL_c_red, IL_attentuation, IL_intensity ]
]],
[["Heli_Attack_02_base_F"], [
	 [ [0,1.5,-2.5], IL_c_red, IL_attentuation, IL_intensity ]
]],
[["c130J_base"], [
	 [ [0,6,-2], IL_c_red, IL_attentuation, IL_intensity ]
]],
[["kyo_MH47E_base"], [
	 [ [0,2,-0.07], IL_c_red, IL_attentuation, IL_intensity ]
]],
[["globemaster_c17"], [
	 [ [0,8,2.44], IL_c_red, IL_attentuation, IL_intensity ]
]],
[["APC_Wheeled_01_base_F"], [
	 [ [0,-3,-0.4], IL_c_red, IL_attentuation, IL_intensity ]
]],
[["APC_Wheeled_02_base_F"], [
	 [ [0.3,-2.7,-0.2], IL_c_red, IL_attentuation, IL_intensity ]
]],
[["APC_Wheeled_03_base_F"], [
	 [ [1,-2.6,-0.7], IL_c_red, IL_attentuation, IL_intensity ]
]],
[["MBT_01_base_F"], [
	 [ [0,-2.7,-0.9], IL_c_red, IL_attentuation, IL_intensity ]
]],
[["APC_Tracked_01_base_F"], [
	 [ [0,-2.4,-0.7], IL_c_red, IL_attentuation, IL_intensity ]
]],
[["APC_Tracked_02_base_F"], [
	 [ [0,-3.1,-0.6], IL_c_red, IL_attentuation, IL_intensity ]
]],
[["APC_Tracked_03_base_F"], [
	 [ [0,-2,-0.6], IL_c_red, IL_attentuation, IL_intensity ]
]],
];

(It's not used here yet, but this format also allows several lightpoints and different colors for each vehicle) :cool:

Share this post


Link to post
Share on other sites

Ok, Lala I hope you don't mind me throwing the whole thing over. ;)

Anyway, here it goes:

http://rising.at/projekte/ArmA/IntLight/v1.5/IntLight.sqf

Simply put this in your init.sqf :

nul=[] execVM "IntLight.sqf";

As mentioned in my last post: I've changed the basic mechanics of the script so it now runs on the player instead of specific vehicles.

The results are as follows:

  • Effect is now local - only the lights in the vehicle you're currently in are rendered
  • Lights are automatically cleaned up when you leave the vehicle, but are still on when you get back inside
  • The script depends on a config-array that defines lights for each vehiclegroup
  • The config can in theory be changed or extended at runtime which also allow modauthors or missionmakers to easily add new configurations without having to change the script itself
  • Vehicles can be set to have their lights only visible in firstperson (good for tanks and apcs)
  • Multiple lights can be defined per vehicle, each with its own settings
  • While each light has its own settings, the overal brightness can be easily adjusted with a multiplier

I've kept the light-settings from Lala intact, except for some minor adjustments.

1. Made lights are a bit darker in general (those interior lights are normally very dim IRL)

2. Moved the light of the Kajman up a bit (was visible from below)

3. Added a very soft orange light in the back of the covered HEMMT (same could be done with other trucks aswell)

The light-config will surely be extended further, this is merely the beginning.

Share this post


Link to post
Share on other sites

An addon version would surely be superb, to always have it on our vehicles ?

Share this post


Link to post
Share on other sites

Yup, that sounds reasonable.

Though I guess its better to stick with the script-version for now, until the config is a bit more complete.

I've just made a small update to the file to show off what actually can be done.

Since the effects are now local and only one vehicle at a time is lit, using more than one light in a vehicle becomes feasible.

The Kajman now uses two weaker lights in the cargo bay instead of one strong one, that way we get less unwanted light on the outside.

On top of that I've added tiny green lights for the gunner and the pilot, which looks pretty sweet at night. :D

There is one problem though: "lightAttachObject" seems to work a bit differently than "attachTo" and the lights seem to lag behind/flicker a bit when the vehicle is moving.

Not sure if anything can be done about that, aside from maybe opening a ticket. :/

Edited by Tajin

Share this post


Link to post
Share on other sites

I have the script installed and have tried calling it via a cba event handler and in a vehicles init box, yet I'm getting no lights and I'm getting no option to turn on any lights.. This is weird.

Share this post


Link to post
Share on other sites

Which version did you use and how exactly did you try to run it?

In case of v1.5, just do it as described and add this line to your init.sqf:

nul=[] execVM "IntLight.sqf";

Edited by Tajin

Share this post


Link to post
Share on other sites
I have the script installed and have tried calling it via a cba event handler and in a vehicles init box, yet I'm getting no lights and I'm getting no option to turn on any lights.. This is weird.

With Tajin's new version the script does not need to be executed on the vehicle but rather the player as the way it now works is by adding the action to the player. The script at the end will automatically add the action to the player and only make it display once a player is in a vehicle from the IL_config which is defined near the beginning of the script.

If your using the current version then the lights will only allow you to turn them on between roughly 6:50 PM and 5:10 AM and you must be either gunner, driver, co-pilot or commander

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×