attach IR to vehicle

1 post in this topic

hey, i new at scripting and trying to make a script that would attach a IR grenade to a vehicle

at the moment i have this as attach to vehicle script


private ["_IRVlight"];

_IRgrenade = ["B_IR_Grenade","O_IR_Grenade","I_IR_Grenade"];

_items = magazines player;
_availIRgrenade = _items arrayIntersect _IRgrenade;

if (count _availIRgrenade == 0) then {hint "No IR Grenade";} else

    _IR = _availIRgrenade call BIS_fnc_selectRandom 
    player removeItem _IR;
    _target = cursorTarget;
    player playMove "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";
    _IRVlight = "B_IRStrobe" createVehicle;
    _IRVlight attachTo _target;

and i have edited my config.cpp with 


            class Attach: ExileAbstractAction
                title = "Attach Ir";
                condition = "true"
                action = "execVM 'addons\IRtoV.sqf';";

at line 896 (class car added it under "class drainfuel etc)

when ingame i get the option to "attach ir" to a vehicle (car) but when activated it does nothing, even when i dont have any ir grenade's it does not give me the hint message of no ir grenade

so i'm thinking the script does not activate when i press it on the scroll wheel menu, but with my limited knowledge i'm a little stuck... :/


any help?


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.