adding Slingload using ALiVE_fnc_combatSupportAdd?

  1. 8 years ago

    I was curious if there was a way to enable CAS and Transport to have slingload capabilities when they are spawned post mission init using ALiVE_fnc_combatSupportAdd?

    Right now they do not have the option enabled when they load in.

  2. Friznit

    27 Aug 2016 Administrator

    could try putting this setVariable ["CS_SLINGLOADING", true]; in the code bit.

  3. Deleted 8 years ago by revdogma
  4. Yeah I tried formatting it a hundred ways couldn't get it too work. This was the closest with an undeclared variable error.

    ["TRANSPORT",[[11695.9,11864.1,0],210,"B_Heli_Transport_01_camo_F","STAIRWAY 07","this setVariable [CS_SLINGLOADING, true]",""]] Call ALiVE_fnc_combatSupportAdd;
  5. Edited 8 years ago by SpyderBlack723
    CS_SLINGLOADING

    needs to be in quotes. Since it's already inside a string, you can either wrap it like so

    'CS_SLINGLOADING'

    or double quotes

    ""CS_SLINGLOADING""

    Resulting in

    ["TRANSPORT",[[11695.9,11864.1,0],210,"B_Heli_Transport_01_camo_F","STAIRWAY 07","this setVariable ['CS_SLINGLOADING', true]",""]] Call ALiVE_fnc_combatSupportAdd;
  6. Edited 8 years ago by revdogma

    I tried both of those. It kept saying i needed a square bracket inside the quotes for "CS_SLINGLOADING" same for the single quotes. Unless i have a format issue somewhere else in the script.

    It would give me this all the time...

    ...setVariable ["|#|CS_SLINGLOA....missing "]"

    Obviously thats the short version of the error.

    Edit: will have to try:
    ""CS_SLINGLOADING""

    Just realized that was in your post lol!

  7. Edited 8 years ago by revdogma

    OK! So , It still doesnt work. I ran it with the double quotes (i.e. ""CS_SLINGLOADING""). When the script fired I got an error that didnt last long on the screen all i remember was it said "Error zero divisor" .

    here is the script im calling:

    ["TRANSPORT",[[11695.9,11864.1,0],210,"B_Heli_Transport_01_camo_F","STAIRWAY 07","this setVariable [""CS_SLINGLOADING"", true]",""]] Call ALiVE_fnc_combatSupportAdd;
    
    ["CAS",[[11554.3,11815.5,0],210,"B_Heli_Attack_01_F","EAGLE 01","",""]] Call ALiVE_fnc_combatSupportAdd;
    
    ["PlayerLog"] call LARs_fnc_spawnComp;

    Thanks.

  8. on-screen errors will always be written to the Arma RPT file (log file) - you can find this file under c:\users\username\appdata\local\arma3

  9. Edited 8 years ago by SpyderBlack723

    Will see if I can look into the code later to see exactly how it's executed.

  10. Thanks guys!

  11. No one figurered anything out then i take it? Lol

  12. Edited 8 years ago by SpyderBlack723

    Could've sworn I followed up on this

    Try this

    ["TRANSPORT",[[11695.9,11864.1,0],210,"B_Heli_Transport_01_camo_F","STAIRWAY 07","(this select 0) setVariable ['CS_SLINGLOADING', true]",""]] Call ALiVE_fnc_combatSupportAdd;

    or this

    ["TRANSPORT",[[11695.9,11864.1,0],210,"B_Heli_Transport_01_camo_F","STAIRWAY 07","(_this select 0) setVariable ['CS_SLINGLOADING', true]",""]] Call ALiVE_fnc_combatSupportAdd;
  13. I tried both and they didnt work ... i actually re-formated the way the mission i was working on so i no longer need to worry about this. Thanks though you guys are awesome!

    I couldnt pretend to know what i was doing without you guys LOL!

 

or Sign Up to reply!