"Join Assault" script and other scripting

  1. ‹ Older
  2. 9 years ago
    Edited 9 years ago by SpyderBlack723

    Confirmation (Just hit reload page it it's struggling and it will post)

  3. Well this is bizarre...It says I've posted my loadout reply but I can't see it here in the thread.

  4. It refuses to post my reply on here. Is it too long? These short replies are posting instantly...no sign of my loadout reply at all.

  5. Just paste it into a pastebin.com and hit submit, and drop the link

  6. http://pastebin.com/XKychxT6

    *note* I sent it via PM to your Bohemia user as well.

    Some of the backpacks were bugged and automatically gave my Russians some Stinger and NLAW rockets. You can ignore those.

    Thanks a ton man for the help.

  7. Edited 9 years ago by SpyderBlack723

    Some of the backpacks were bugged and automatically gave my Russians some Stinger and NLAW rockets. You can ignore those...

    Probably a pre-packed backpack. Meaning that they automatically come with items. You can get around it if necessary. I'll try to edit that real quick and post it back, leaving in like 5 min. Time is of the essence!

  8. Edited 9 years ago by SpyderBlack723

    Ok here we go

    Put this in your init.sqf

    call compile preprocessFile "loadouts.sqf";

    Paste all of this into a file called loadouts.sqf (put in the root of your mission folder)
    http://pastebin.com/DjaAhdcc

    Finally, in your customGear.sqf that we used to apply code to all units of side east, change it to this

    private["_unit"];
    _unit = _this select 0;
    
    _loadout = [loadout_fnc_1,loadout_fnc_2,loadout_fnc_3,loadout_fnc_4,loadout_fnc_5,loadout_fnc_6,loadout_fnc_7,loadout_fnc_8,loadout_fnc_9,loadout_fnc_10,loadout_fnc_11,loadout_fnc_12] call BIS_fnc_selectRandom;
    
    if (side _unit == east) then {
    	//-- Call the randomly selected function to add the custom gear
    	[_unit] call _loadout;
    };

    Hopefully that will work, if not I'll be back later with more time to check it more thoroughly.

  9. Dude, it works and it's AMAZING.

    Now I can run completely "Arctic inspired" missions with ease against the Russians.

    You are the man.

    I'll post my missions on here when I'm done tweaking them.

  10. Glad it worked, have fun

  11. Spyder,

    Could I do something similar w Civillians?

    There aren't any good European Civ mods. If I took the time to create a bunch of civ load outs in the arsenal and exported, would it spawn the Civ_F Civs in that custom gear?

    Then I could save that script and paste it into any European setting I wanted to.

  12. Edited 9 years ago by SpyderBlack723

    You could do it yes, you would just do if (side _unit == civilian) then {}; at the top to filter out for civilians.

    There aren't any good European Civ mods

    Might want to check out RDS civilian pack, haven't used it personally for myself but it ports Arma 2 civilians/vehicles and looks pretty nice.

    EDIT:
    http://pastebin.com/FZNqu0sa
    European civilians (Requires TYRK gear and Army of the Czech Republic mods) thanks to AUTigerGrad, implemented the same way as above but instead with..

    _civLoadout = [civLoadout_fnc_1,civLoadout_fnc_2,civLoadout_fnc_3,civLoadout_fnc_4,civLoadout_fnc_5,civLoadout_fnc_6,civLoadout_fnc_7,civLoadout_fnc_8,civLoadout_fnc_9,civLoadout_fnc_10,civLoadout_fnc_11,civLoadout_fnc_12,civLoadout_fnc_13,civLoadout_fnc_14,civLoadout_fnc_15,civLoadout_fnc_16] call BIS_fnc_selectRandom;
    
    
    if (side _unit == civilian) then {
    	[_unit] call _civLoadout;
    };

    Functions from pastebin file must be defined in loadouts.sqf and called from the init.sqf using

    call compile preprocessFile "loadouts.sqf";
  13. Edited 9 years ago by SpyderBlack723

    Actually got around to doing something that might be useful to any other scripters wanting to do stuff with ALiVE. Wanted to spice up some conventional missions so I dove into trying to mix my scripts into ALiVE's objective system so I could make things like counterattacks and reinforcements when objectives were being attacked/lost (ALiVE does this already but I was going to do some special stuff like paratroopers). Only have two functions right now but I am definitely gonna make more if possible since this is only the beginning of my project. Hopefully these functions don't already exist somewhere, otherwise I wasted my time :|

    Anyone who is interested in this type of stuff should also look into a few functions Cameroon made awhile ago.

    1. Get's all opcoms that control any of the passed factions

    ["OPF_F"] call Spyder_fnc_getFactionOpcoms;

    returns an array [_opcom,[_factions]] in which _opcom is the logic itself and _faction is an array of the factions that it controls that were picked from the array that was passed into the function (To provide more accurate results if an opcom controls multiple factions). If the opcom controls a single faction, _faction is structured as ["EAST"], if it controls multiple then it is structured as ["EAST","WEST"].

    Spyder_fnc_getFactionOpcoms = {
    	_factions = _this;
    	_result = [];
    	{
    		_opcom = _x;
    		_factionGroup = [];
    		_opcomFactions = [_opcom,"factions",[]] call ALiVE_fnc_HashGet;
    		{
    			_faction = _x;
    			if (_faction in _factions) then {
    				_factionGroup pushBack _faction;
    			};
    		} forEach _opcomFactions;
    		_data = [_opcom,_factionGroup];
    		_result pushBack _data;
    	} foreach OPCOM_instances;
    _result;
    };

    2. Get's all opcoms that control any of the passed sides

    ["EAST"] call Spyder_fnc_getSideOpcoms;

    Returns all opcoms that control any of the sides that were passed into the function.. [_opcom,_side]

    Spyder_fnc_getSideOpcoms = {
    	_sides = _this;
    	_result = [];
    	{
    		_opcom = _x;
    		_opcomSide = [_opcom,"side",""] call ALiVE_fnc_HashGet;
    		if (_opcomSide in _sides) then {
    			_data = [_opcom,_side];
    			_result pushBack _data;
    		};
    	} foreach OPCOM_instances;
    _result;
    };
 

or Sign Up to reply!