Jump to content
Lala14

[RELEASE] Vehicle IR strobe

Recommended Posts

Vehicle IR strobe

As the title says it adds vehicle IR strobes to vehicles in game

AS OF UPDATE 5.5

nul = [] "vehicleirstrobe.sqf";

To disable a vehicle from using ir place in the vehicle's init

this setVariable ["strobe",true];

Features

  • Action comes up between 18:50 until 05:10
  • Different positions where the IR strobe is placed (currently different places for mostly each vehicle)
  • Only works on LandVehicle class can be modified though
  • Should work in multiplayer
  • Action only comes up for either driver,gunner or commander

Issues present

  • Since I don't know the mempoint for the turret (not the muzzle) I cannot make the strobe attached to it so instead it is attached to the hull of the vehicle, If anyone knows the mem point or would like to offer a way to solve this PLEASE DO! edit: created http://feedback.arma3.com/view.php?id=18587
  • Co-Pilot does not have the ability to turn on IR strobe in some vehicles. Issue is only present currently on the MH-47E due to the left gunner being the turret of 0 rather than what the pilot should be.

TO-DO

  • Add predefined vehicles from mods this will start in the next update with air vehicles and so forth (so far added USAF,F-15C,Pearl A-10C, F/A 18 E/F and SU-35, C-130J Transport/Cargo)

Feel free to modify with credits obviously to Tajin and/or me

As said any optimizations or suggestions are welcome!

http://i.imgur.com/2ucAdhB.gif (1559 kB)

DOWNLOAD

vehicleirstrobe.sqf

Credits :-

Tajin for help with optimizations and how to use variables and overall structure of the script

[GiBThis] - J.Camel for the idea

Me(Lala) for the creation of the script

Player IR strobe

I've now created a script for player IR strobes

To be soon incorporated also is to make sure the player has a specific helmet on rather than just have a helmetUpdate 4

As of Update 5

place in the init.sqf

nul = [] execVM "irstrobe.sqf";

and to disable ir attaching to a vehicle place in the vehicle's init

this setVariable ["strobes",true];

Features

  • Action comes up between 18:50 until 05:10
  • Works on all including AI (manually turn on by squad leader selecting AI then going into Actions (6) then selecting IR strobe On removed in Update 5
  • Should work in multiplayer
  • Action only comes up for the one unit and no one else can modify it
  • IR strobe is only accessible on foot works perfectly along side also with Vehicle IR Strobe script

TO-DO

  • Make script only work when a player has the specific helmet on (currently works with player only requiring something in the headgear slot)
  • Make script work with other faction grenades rather than just the one blufor ir grenade
  • Adding a variable at the top to set the IR strobe to either be SF (MS2000 which is placed on the helmet) or standard (on the left strap on vest)

http://i.imgur.com/HjHRKu6.gif (1057 kB)

DOWNLOAD

irstrobe.sqf

Credits :-

Tajin for help with optimizations and how to use variables and overall structure of the script

Fullerpj for the idea

Me(Lala) for the creation of the script

Show off Mission Download (single player editor)

test_strobe.Altis.rar

IR_Strobe_Example.Stratis

ChangeLog



Vehicle IR Strobe

Vehicle IR Update 1:

-Added Support vehicles and quadbikes

-Fixed debug not working due to vehicleChat being called by player rather than object

Vehicle IR Update 2:

-Added Air vehicles, Autonomous, ships and submarines

-Added Another Variable for the attaching of strobes to vehicles

Vehicle IR Update 3:

-Added support for USAF addon, F/A 18 and SU35, C-130J and F-15C Eagle

-Fixed some position faults for some vehicles

-Fixed vehicles that are based off specific vehicles for re-texture mods

Vehicle IR Update 4:

-Changed layout of the script

-Added MH-47E compatibility

-Debug variable name has changed

Vehicle IR Update 5:

-Changed variable name for attaching ir strobe to vehicles to work with new attaching ir strobe ways

Vehicle IR Update 5.5:

-Allowed for vehicles later placed in the game to automatically have IR action placed automatically

-Removed a line in the code for the old way of attaching IR strobes to vehicles

-Partially added support for BTR-60,BRDM-2 and M113 (more to come arma kept crashing sadly)

-To disable now place in the vehicle's init this setVariable ["strobe",true];

Vehicle IR Update 6:

-Added support for HAFM Helis, HAFM HMMWV, HAFM UAZ, HAFM UKVEH,RDS Tank pack, ADF, East vs West, RAID M1 Abrams

Player IR strobe

Player IR strobe Update 1:

-Added ability for player to attach strobes to vehicles (beta)

-When attaching a strobe you are required to have the blufor ir grenade for now

-You can take back the strobe at any time and it will add a blufor ir grenade to your inventory

-Animation done when placing/taking the strobe

-In order to use the attach strobe you will require vehicleirstrobe.sqf executed because this adds the variable

Player IR strobe Update 2:

-Player now can control UAV strobe when connected to uav while walking

-Found bug where addmagazine causes 2 IR strobes to be added, to compensate It's deleting the second one

Player IR strobe Update 3:

-All of the things added in from Update 2 is now multiplayer compatible (attaching ir strobes/taking ir strobes and controlling ugv/uav strobe lights on/off)

-Debug variable name has changed

-Remove the bug about where addmagazine causes to add 2 IR strobes (this is a single player issue not multiplayer)

-Script layout changed

-Option to either place the IR on head or vest

-Option now for Item Restriction (uses a blacklist)

Player IR strobe Update 4:

-IR grenades for each faction will work (e.g. a nato player places an indep ir nade on a vehicle, that vehicle will give back a indep ir nade to any another player on any side)

-Each nade has been assigned to each side when being placed so it will pop up on radar as enemy but friendly to the opposite side (e.g. blufor ir nade on a csat tank will come up as friendly to csat but enemy to blufor)

-Each team uses it's own nvg_target so if you are on blufor you will come up as friendly to blufor but no one else (same as above) (optional only for players)

Player IR strobe Update 5:

-Fixed bug with 2 IR grenades being created when attaching one IR grenade

-Addaction will now come up with what vehicle you will either be attaching/taking the IR grenade from

-No more requirement for Vehicle IR Strobe since the script now does this it self

-Script now works with respawn (should of added this earlier)

Player IR strobe Update 5.01:

-When player gets in vehicle it should stop displaying "IR Strobe On" rather than "Vehicle IR Strobe On"

Player IR strobe Update 5.5:

-Attaching of IR strobes will now work when a vehicle is spawned in mid way through the mission

-You can now disable attaching IR strobe by putting in the init this setVariable ["strobes",true];

---------- Post added at 18:01 ---------- Previous post was at 17:52 ----------

Woops thought I was in the Mission editing and scripting thread :/

If a moderator could move this there that would be great

Edited by Lala14
Updated V6
  • Thanks 1

Share this post


Link to post
Share on other sites

If you can make it into a addon and to a place able IR strobe for troops and Vehicles you sir will be the man!!! its something ive always wanted

Share this post


Link to post
Share on other sites

Well I could modify this script to change it also to allow for troops, as for an addon I have no experience what so ever on addons and scripts so maybe if anyone would like to help I could possibly make this into an addon and leave also the script version just in case people don't want the addon and rather a script.

I will start though looking at all the helmets in ArmA 3 and getting there class names to make the IR strobe script for troops.

Also I did also want to ask to everyone was that would you prefer for the strobe to be visible to all teams or just for the side (i.e. Blufor will see strobes on their side but not anyone else's). Currently it is set so every team can see it.

Share this post


Link to post
Share on other sites

Would be nice to add two IR strobes to the helos as well. One under the fuselage body, and one on the top of the tail, both about a half second of timing off from the other.

Share this post


Link to post
Share on other sites

As IR is IR, everyone with the ability to see it would see it.

Regarding making it as an addon, there are a huge number of talented people here that should be able to help you. Perhaps if they are reading this they can drop you a PM as to the process.

Share this post


Link to post
Share on other sites
As IR is IR, everyone with the ability to see it would see it.

Regarding making it as an addon, there are a huge number of talented people here that should be able to help you. Perhaps if they are reading this they can drop you a PM as to the process.

Agreed with Kremator 100% everyone with the ability to see it should see it to deliver the proper realism. The AC-130 and helicopter gunships would benefit greatly as we can add that danger close feeling to night ops. I was thinking of MOH 2010 when they used strobes to target vehicles and radioed in that strobes were unfriendly for the moment until there destruction and then strobes were friendly again. make sure its throwable also :) good luck brother i hope this comes to fruition.

Share this post


Link to post
Share on other sites
Agreed with Kremator 100% everyone with the ability to see it should see it to deliver the proper realism. The AC-130 and helicopter gunships would benefit greatly as we can add that danger close feeling to night ops. I was thinking of MOH 2010 when they used strobes to target vehicles and radioed in that strobes were unfriendly for the moment until there destruction and then strobes were friendly again. make sure its throwable also :) good luck brother i hope this comes to fruition.

Well I was actually thinking of making it so that when the player has an IR strobe he can attach it to said vehicle and that way maybe something could engage it from afar (e.g. UAV) Also another thing I have discovered is that using NVG_TargetC actually makes the strobe come up on the radar on vehicles, I found this out after making the player IR script, it comes up empty on the radar thought also.

As for air vehicles I may do this when I have some spare time (probably tomorrow) and I will currently try to work on either allowing for attaching an IR strobe to mark a vehicle (I remember that mission also from MOH 2010) and then trying to make the IR strobe script for players on work as planned when a player has a helmet on rather than something in the headgear slot.

I will also see if I can contact someone to help incorporate this into a addon soon once this is all done. If anyone does also have any information or would like to contact me also on making this into an addon feel free to.

Share this post


Link to post
Share on other sites

Releases 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

Woops thought I was in the Mission editing and scripting thread :/

If a moderator could move this there that would be great

Done :D

Share this post


Link to post
Share on other sites

Hey, thanks for your script - just been trying it and it works fine, though im getting this error in the top right corner once ive turned the IR Strobe On.

B_Soldier_F has no _pos defined

ttt_zps187cd5e8.jpg

Share this post


Link to post
Share on other sites
Hey, thanks for your script - just been trying it and it works fine, though im getting this error in the top right corner once ive turned the IR Strobe On.

http://i276.photobucket.com/albums/kk10/djkaplin/ttt_zps187cd5e8.jpg

I have no idea why this is happening, my version is working completely fine, If it is possible for you to send me maybe the mission.pbo or script itself I can see what this is happening. For now though I'm going to attach a mission.

http://i.imgur.com/3ZH4a92.jpg (228 kB) <- this is how it should come up though which it has on my screen. Update is inbound anyway with the ability to attach IR strobes to vehicles!

Anyway this error is to say that the player IR is not being moved and is attachedto at [0,0,0]. If you can visually see that this is fine then I suggest turning debug off, maybe I've broken my debug :S

---------- Post added at 00:34 ---------- Previous post was at 22:48 ----------

Would be nice to add two IR strobes to the helos as well. One under the fuselage body, and one on the top of the tail, both about a half second of timing off from the other.

Done, I also have done this to planes ;)

Share this post


Link to post
Share on other sites

Updated releases 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
Updated releases 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!

Thank you Foxhound!

Share this post


Link to post
Share on other sites

Here you go mate, just tried the new version and im still getting it. Also with the MRAP ive tried it on too.

The example mission has both on it, you can try and see for yourself :)

Share this post


Link to post
Share on other sites
Here you go mate, just tried the new version and im still getting it. Also with the MRAP ive tried it on too.

The example mission has both on it, you can try and see for yourself :)

Thank you! anyway the reason to why this is happening is because of how I have set the debug up, I've fixed that now

when the debug was set to 0 it would then say these messages even though they were working fine.

---------- Post added at 19:25 ---------- Previous post was at 19:19 ----------

I've done a small patch to fix this right now but I will also be adding a proper update within the hour to add USAF vehicles, the F/A 18, SU-35 and A-10C for vehicle IR strobe

---------- Post added at 19:26 ---------- Previous post was at 19:25 ----------

and the F-15C Eagle ;)

---------- Post added at 19:27 ---------- Previous post was at 19:26 ----------

and c-130 cargo/transport

Share this post


Link to post
Share on other sites
Thank you! anyway the reason to why this is happening is because of how I have set the debug up, I've fixed that now

when the debug was set to 0 it would then say these messages even though they were working fine.

I've done a small patch to fix this right now but I will also be adding a proper update within the hour to add USAF vehicles, the F/A 18, SU-35 and A-10C for vehicle IR strobe

No problems mate, thanks for the work anyways. Maybe you could also add a function to show the red strobe inside of a chopper for maybe a night light which ive requested help with here?

Thanks again.

Share this post


Link to post
Share on other sites
No problems mate, thanks for the work anyways. Maybe you could also add a function to show the red strobe inside of a chopper for maybe a night light which ive requested help with here?

Thanks again.

Yea sure I'll come over and help, just would like to know is this for a specific chopper or just all choppers in general or just the transport ones, and is this for the pilot or people in cargo.

Share this post


Link to post
Share on other sites
Yea sure I'll come over and help, just would like to know is this for a specific chopper or just all choppers in general or just the transport ones, and is this for the pilot or people in cargo.

I will answer you in that thread mate, saves messing your thread up here on a different topic :)

Share this post


Link to post
Share on other sites

Couldn't this be put into a .pbo rather easily?

Seems a chore going back and updating 40+ mission just so they can include ir strobes for vehicles

Share this post


Link to post
Share on other sites

Updated releases 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

Updated

Changelog on first post!

Share this post


Link to post
Share on other sites

Thanks for the headsup about the new versions :cool:

Updated releases 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

Hello. I was messing around and umm... pretty much "butchering" this irstrobe.sqf to be as minimal as possible, here's the result.

IRstrobeLite.sqf

Spoiler

// Player IR script v5.5 2014.05.22 By: Lala14 & Tajin Edit By csk222 (IRstrobeLite)
// init line: nul = [] execVM "irstrobelite.sqf";

if (isDedicated) exitWith {};
waitUntil {!isNull player};

LALA_fnc_StrobeChem_addActions =
{
	player setVariable ["strobeplayer","none",true];
	IRstrobeOn = player addAction ["IR Strobe <img size='3' image='a3\weapons_f_epb\Ammo\Data\UI\gear_B_IRstrobe_CA.paa'/>",
	{(_this select 0) spawn LALA_fnc_IRStrobeOn;},"",-98,false,true,"",'typeName (_target getVariable "strobeplayer") != "OBJECT" && (_target == _this) && (daytime > 18.7 OR daytime < 5.3)'];
	
	IRstrobeOff = player addAction ["IR Strobe <img size='3' image='a3\weapons_f_epb\Ammo\Data\UI\gear_B_IRstrobe_CA.paa'/>",
	{(_this select 0) spawn LALA_fnc_IRStrobeOff;},"",-98,false,true,"",'typeName (_target getVariable "strobeplayer") == "OBJECT" && ( _target == _this)'];
	
	player setVariable ["chemplayer","none",true];
	IRchemOn = player addAction ["Chemlight <img size='2' image='a3\weapons_f\Data\UI\M_chemlight_red_CA.paa'/>",
	{(_this select 0) spawn LALA_fnc_IRchemOn;},"",-99,false,true,"",'typeName (_target getVariable "chemplayer") != "OBJECT" && (_target == _this) && (daytime > 18.7 OR daytime < 5.3)'];
	
	IRchemOff = player addAction ["Chemlight <img size='2' image='a3\weapons_f\Data\UI\M_chemlight_red_CA.paa'/>",
	{(_this select 0) spawn LALA_fnc_IRchemOff;},"",-99,false,true,"",'typeName (_target getVariable "chemplayer") == "OBJECT" && ( _target == _this)'];
};

LALA_fnc_IRStrobeOn =
{
	_strobe = "NVG_TargetE" createVehicle getPos _this;
	_strobe attachTo [_this,[0,0,0],"spine3"];		
	_this setVariable ["strobeplayer",_strobe,true];
};

LALA_fnc_IRStrobeOff =
{
	deleteVehicle (_this getVariable "strobeplayer"); 
	_this setVariable ["strobeplayer","none",true];
};

LALA_fnc_IRchemOn =
{
	_chem = "Chemlight_Red" createVehicle getPos _this;
	_chem attachTo [_this,[0,-0.03,0.07], "LeftShoulder"];			
	_this setVariable ["chemplayer",_chem,true];
};

LALA_fnc_IRchemOff =
{
	deleteVehicle (_this getVariable "chemplayer"); 
	_this setVariable ["chemplayer","none",true];
};

[] spawn LALA_fnc_StrobeChem_addActions;
player addEventHandler ["Respawn", {[] spawn LALA_fnc_StrobeChem_addActions;}];

 

It seems to work as intended. Can you skim over it to see if I took out any vital lines for this to work properly - Thanks

Share this post


Link to post
Share on other sites

How do I get rid of the time variable? I want the IR strobe to work at any given time, not just between 1800-0500. 

 

Thanks 

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

×