Jump to content

IgiLoad Script ( Load-up AI Box Creates, New Vehicle Verification ) [Updated 0.3.7.0]


EliteWarfare

Recommended Posts

 

Hello everyone so if your having trouble with RF3_LOG Towing script here's 

IgiLoad Script all Credits go to IgiLoad Creators

ALSO I DID NOT CREATE THIS SCRIPT

All i did was put the BE Filters for you guys

 

 

Download This: Download Here! :D

 

...

 

EliteWarfare - Great job. Thank you :)

 

Ive added the call into the init.sqf but im still getting no option to load vics ? any ideas ?

if (isServer) then {

fn_getBuildingstospawnLoot = compile preProcessFileLineNumbers "fn_LSgetBuildingstospawnLoot.sqf"; 

LSdeleter = compile preProcessFileLineNumbers "LSdeleter.sqf";

execVM "Lootspawner.sqf";

};

 

if(isDedicated)exitWith{}; //Everything below this line is only executed on the client (player or local host)

 

//Wait until these variables are broadcasted to the client (usually happens before the init gets executed)

waitUntil{!isNil {SEM_AIdropGearChance}};

waitUntil{!isNil {SEM_removeWeaponsFromDeadAI}};

waitUntil{!isNil {SEM_removeMagazinesFromDeadAI}};

//diag_log format["#SEM DEBUG: variables received: Weapons %1 - Magazines %2", SEM_removeWeaponsFromDeadAI, SEM_removeMagazinesFromDeadAI];

 

SEM_client_createMissionMarker = { private["_create","_markerPos","_markerName","_marker"];

_create = _this select 0;

 

if(!_create)then[{ //delete marker

if (getMarkerColor "MissionMarker" != "")then{ //Only delete existing Marker

deleteMarkerLocal "MissionMarker";

}; 

},{ //else create marker

_markerPos = _this select 1;

_markerName = _this select 2;

 

_marker = createMarkerLocal ["MissionMarker", _markerPos];

_marker setMarkerPosLocal _markerPos;

_marker setMarkerTypeLocal "hd_destroy";  

_marker setMarkerTextLocal format["%1",_markerName];  

_marker setMarkerColorLocal "ColorRed";

_marker setMarkerDirLocal -37;

_marker setMarkerSizeLocal [0.8,0.8];

}];

};

 

SEM_client_removeGear = {

removeVest _this;

//removeHeadgear _this;

removeGoggles _this;

removeAllItems _this;

removeAllWeapons _this;

removeBackpackGlobal _this;

{_this removeMagazine _x}count magazines _this;

};

 

SEM_client_AIfiredEH = {

if(isPlayer _this || !local _this)exitWith{systemChat "NEIN!"};

 

call compile format["

_this addEventHandler ['Fired',{

if(_this select 2 in %1)then{

_this select 0 addMagazines [_this select 5, 1];

};

}];

", ["launch_RPG32_F","launch_NLAW_F","launch_Titan_short_F","launch_Titan_F"]];

};

 

SEM_client_AIaddKilledEH = {

if(isPlayer _this || !local _this)exitWith{systemChat "NEIN!"};

 

/* Remove Weapons when killed */

call compile format["

_this addEventHandler ['Killed',{ private ['_unit','_z','_ran'];

_unit = _this select 0;

{_unit removeWeaponGlobal _x}count (%1 + ['EpochRadio0','ItemMap','ItemRadio','ItemWatch','ItemCompass','ItemGPS']);

{if(_x in (magazines _unit))then{_unit removeMagazines _x}}count %2;

 

if(SEM_AIdropGearChance < ceil(random 100))then{

_unit call SEM_client_removeGear;

{deleteVehicle _x}forEach nearestObjects [(getPosATL _unit), ['GroundWeaponHolder','WeaponHolderSimulated','WeaponHolder'], 1];

};

 

_unit spawn{

sleep .1;

{_z = _x;

if(_x in (getweaponcargo _z))exitWith{deleteVehicle _z}count %1;

if(_x in (getmagazinecargo _z))exitWith{deleteVehicle _z}count %2;

}forEach nearestObjects [(getPos _this), ['GroundWeaponHolder','WeaponHolderSimulated','WeaponHolder'], 12];

};

}];

", SEM_removeWeaponsFromDeadAI, SEM_removeMagazinesFromDeadAI];

 

/* AI run over by vehicle */

_this addEventHandler ["killed", { private["_u","_k","_vk","_s"];

_u = _this select 0;

_k = _this select 1;

_vk = vehicle _k;

 

if(_vk isKindOf "Car")then{

if(abs speed _vk > 0)then{

if(_vk distance _u < 10)then{

if(isEngineOn _vk || !isNull (driver _vk))then{

_u call SEM_client_removeGear;

{deleteVehicle _x}forEach nearestObjects [(getPosATL _u), ['GroundWeaponHolder','WeaponHolderSimulated','WeaponHolder'], 3];

 

if({alive _x}count units group _u < 1)then[{

"R_PG32V_F" createVehicle (position _u);

},{

//_vk setVelocity [(velocity _vk select 0)*.25, (velocity _vk select 1)*.25, 2];

_s = [ "wheel_1_1_steering","wheel_2_1_steering","wheel_1_2_steering","wheel_2_2_steering",

"wheel_1_3_steering","wheel_2_3_steering","wheel_1_4_steering","wheel_2_4_steering",

"MOTOR","glass1","glass2","glass3","door1","door2","door3","door4"];

{_vk setHit [_x,(_vk getHit _x)+(.3+(random .2))]}count _s;

}];

}}}};

}];

};

 

 /* DO NOT CALL "fn_animateAI" because the sleep commands will cause errors when used in a non-scheduled environment */

SEM_client_animateAI = { private["_group","_pos","_checkPos","_firstLoop","_nearThreads","_doMove","_dir","_dist","_posX","_posY","_oldPos","_newPos","_z"];

_group = _this select 0;

_pos = _this select 1;

_checkPos = _pos; _checkPos set [2,3];

 

waitUntil{{owner _x == owner player}forEach units _group}; //Wait until the server gives You the ownership of the AI

diag_log format["#SEM: Client taking over AI ownership at Pos %1, Distance %2, Units: (%3/%4)", _pos, (vehicle player) distance _pos, {alive _x}count units _group, count units _group];

 

{

_x call SEM_client_AIfiredEH;

_x call SEM_client_AIaddKilledEH;

_x enableAI "AUTOTARGET";

//_x enableAI "TARGET";

_x enableAI "MOVE";

_x enableAI "ANIM";

_x enableAI "FSM";

_x stop false;

_x setUnitPos "Middle"; //"Auto"

}count units _group;

_group setCombatMode "YELLOW";

_group setBehaviour "COMBAT"; //"AWARE";

 

//waitUntil{{alive _x}count units _group < 1 || ({owner _x != owner player}forEach units _group)};

 

while{{alive _x}count units _group > 0 && ({owner _x == owner player}forEach units _group)}do{

_nearThreads = _pos nearEntities [["Epoch_Man_base_F","Epoch_Female_base_F","Helicopter","Car","Motorcycle"], 1200]; //"Epoch_Man_base_F","Epoch_Female_base_F"

 

{if(alive _x && isPlayer _x)then{ _z = _x;

{if !(lineIntersects [eyePos _x, eyePos _z, (vehicle _x), (vehicle _z)] || terrainIntersectASL [eyePos _x, eyePos _z])then{

_group reveal [_z,4];

if((secondaryWeapon _x) == "")then[{

_x doWatch _z; _x doTarget _z;

_x commandFire _z; _x suppressFor 3;

},{

if !(_z isKindOf "Epoch_Man_base_F" || _z isKindOf "Epoch_Female_base_F")then{

_x doWatch _z; _x doTarget _z; _x commandFire _z;

};

}];

}}forEach units _group;

UIsleep (3+(random 2));

}}forEach _nearThreads;

UIsleep 3;

};

 

diag_log format["#SEM: AI ownership lost - Remaining AIs: (%1/%2)", {alive _x}count units _group, count units _group];

};

 

"SEM_globalHint" addPublicVariableEventHandler { private "_sound";

_sound = (_this select 1) select 0;

switch(_sound)do{

case 0:{playSound "UAV_05"}; //Mission start

case 1:{playSound "UAV_01"}; //Mission fail (object destroyed)

case 2:{playSound "UAV_04"}; //Mission fail (time out)

case 3:{playsound "UAV_03"}; //Mission success

};

hint parseText format["%1", (_this select 1) select 1]

};

 

if(!isNil "SEM_globalMissionMarker")then{SEM_globalMissionMarker call SEM_client_createMissionMarker};

"SEM_globalMissionMarker" addPublicVariableEventHandler {_this select 1 call SEM_client_createMissionMarker};

 

if(!isNil "SEM_takeAIownership")then{SEM_takeAIownership call SEM_client_animateAI};

"SEM_takeAIownership" addPublicVariableEventHandler {_this select 1 spawn SEM_client_animateAI}; //DO NOT CALL!

 

 

[] spawn { /* This is the advertisement. If You don't like it, remove it */

waitUntil{vehicle player == player && time > 5};

systemChat format["Welcome to EPOCH %1 survivor %2", str(toUpper worldName), name player];

systemChat format["This server is running %1 v0.7", str "Simple Epoch Missions"];

}; /* End of advertisement */

 

if(toLower worldName in ["chernarus","chernarus_summer"])then{

([4654.62,9593.63,0] nearestObject 145259) setDamage 1;

([4654.62,9593.63,0] nearestObject 145260) setDamage 1;

}; //Fix for something, find out ;)

 

 

[player] execVM "scripts\simpleEP.sqf";

 

[] execVM "scripts\fn_statusBar.sqf";

 

[] execVM "IgiLoad\IgiLoadInit.sqf";

 

 

[] execVM "scripts\zod_stakedown_init.sqf";

 

private ["_player"];

if (!isServer) then {

waitUntil {!isNull player};

waitUntil {player == player};

 

while {true} do {

_player = player;

player addEventHandler ["Respawn", {

_PistolANDmag = [["hgun_Pistol_Signal_F","6Rnd_GreenSignal_F"],["hgun_Pistol_Signal_F","6Rnd_RedSignal_F"],["hgun_Pistol_heavy_02_Yorris_F","6Rnd_45ACP_Cylinder"],["hgun_Pistol_heavy_02_F","6Rnd_45ACP_Cylinder"],["hgun_Pistol_heavy_01_MRD_F","11Rnd_45ACP_Mag"],["hgun_Pistol_heavy_01_snds_F","11Rnd_45ACP_Mag"],["hgun_Pistol_heavy_01_F","11Rnd_45ACP_Mag"],["hgun_ACPC2_snds_F","9Rnd_45ACP_Mag"],["hgun_ACPC2_F","9Rnd_45ACP_Mag"],["hgun_Rook40_snds_F","16Rnd_9x21_Mag"],["hgun_Rook40_F","16Rnd_9x21_Mag"],["hgun_P07_snds_F","16Rnd_9x21_Mag"],["hgun_P07_F","16Rnd_9x21_Mag"]] call BIS_fnc_selectRandom;

_pistol = _PistolANDmag select 0;

_mag = _PistolANDmag select 1;

_item = "FAK";

_food = ["CookedSheep_EPOCH","CookedGoat_EPOCH","CookedChicken_EPOCH","CookedRabbit_EPOCH","ItemTunaCooked","ItemSeaBassCooked","ItemTroutCooked","FoodSnooter","FoodMeeps"] call BIS_fnc_selectRandom;

_drink = ["ItemSodaRbull","ItemSodaOrangeSherbet","ItemSodaPurple","ItemSodaMocha","ItemSodaBurst","FoodWalkNSons","WhiskeyNoodle"] call BIS_fnc_selectRandom;

_uniform = ["U_C_Driver_4","U_C_Driver_3","U_C_Driver_2","U_C_Driver_1","U_C_Scientist","U_C_Journalist","U_C_WorkerCoveralls","U_C_Poor_1","U_C_Poloshirt_redwhite","U_C_Poloshirt_salmon","U_C_Poloshirt_tricolour","U_C_Poloshirt_burgundy","U_C_Poloshirt_blue","U_C_Poloshirt_stripped"] call BIS_fnc_selectRandom;

_vest = ["V_16_EPOCH","V_15_EPOCH","V_14_EPOCH","V_13_EPOCH","V_12_EPOCH","V_11_EPOCH","V_10_EPOCH","V_9_EPOCH","V_8_EPOCH","V_7_EPOCH","V_6_EPOCH","V_5_EPOCH","V_4_EPOCH","V_3_EPOCH","V_2_EPOCH","V_1_EPOCH"] call BIS_fnc_selectRandom;

hint format [" %1 \n %2 \n %3 \n %4 \n %5 \n %6 \n %7",_pistol,_mag,_item,_food,_drink,_uniform,_vest];

player addVest _vest;

player addWeapon _pistol;

player addMagazine _mag;

player addMagazine _item;

player addMagazine _food;

player addMagazine _drink;

player addWeapon "EpochRadio0"; 

_modelMale = (typeOF player == "Epoch_Male_F");

            _modelFemale = (typeOF player == "Epoch_Female_F");

        

                if (_modelFemale) then {

                     player forceAddUniform "U_BasicBodyFemale";

                         };

                if (_modelMale) then {

                    player forceAddUniform _uniform;

                         };              

 

}]; waitUntil {_player != player}; 

}; 

};

Leigham - I see one mistake. IgiLoad have to be run on server side and client side. Try to move IgiLoad line before

if(isDedicated)exitWith{};

.

 

Can I change what I can lift and not?

Uebermorgen - Yes. More info you can find on BI Forum and http://www.igipl.net/

 

Found a nasty little bug.

 

Load vehicle with damaged wheels onto another vehicle.

 

Unload > Magically have full health on the loaded vehicle.

 

Not too sure what's going on there, but I'll take a look at the script, and see if I can find the bug :D

BlackPlague_81st - This is IgiLoad feature. You can change it "IL_CDamage" more info: http://www.igipl.net/en/arma3/igiload-script/igiload-customize-settings

 

All - You have to unload all vehicles fro vehicles before server restart. AttachTo is not recreated by EPOCH or IgiLoad after creating vehicles.

 

Have Fun :)

Link to comment
Share on other sites

Having an issue with parachute not attaching to cargo - appears, attaches, then disappears, cargo goes to sit on ground with no damage. Have removed my AH and no difference, no battleye kicks either. Any help is appreciated!

 

Let me know if you found a solution. It drove me crazy. I just unload near the ground.

Link to comment
Share on other sites

Having an issue with parachute not attaching to cargo - appears, attaches, then disappears, cargo goes to sit on ground with no damage. Have removed my AH and no difference, no battleye kicks either. Any help is appreciated!

 

 

Let me know if you found a solution. It drove me crazy. I just unload near the ground.

 

Xeygwyntynmanz - What is altitute? Minimal allowed is not safe it is only minimal. Is the parachute enabled in EPOCH? Parachute will open ~20 m from heli - this is safe distance to not damage heli.

Link to comment
Share on other sites

Hello,

 

Opens fine. Just doesn't last. The chute opens and looks fine for a few secs., disappears then crashes. Sometimes the vehicle I drop is usable or not, same with the crate. I have tried from different heights. I started with default settings in the cfg then increased/decreased.

 

Sounds like the same problem as Xeygwyn mentioned, so hoping I missed something. I figured it was the AH, though left it as I can deal with hovering a few feet and dropping cargo off. Would like to get it going for eye candy.

 

"parachute enabled in EPOCH"? I must have missed this setting?

Link to comment
Share on other sites

After installing the script and BE exceptions, I kept getting kicked for other BE exceptions. Took about 10 restarts to get all the right ones in and players were still getting kicked out. Took the script out and all is fine. Gonna have to go over it again I think.

 why restart?      Edit the script on a running server, then reload scripts from Dart or other rCon prog.

Link to comment
Share on other sites

Hello,

 

Opens fine. Just doesn't last. The chute opens and looks fine for a few secs., disappears then crashes. Sometimes the vehicle I drop is usable or not, same with the crate. I have tried from different heights. I started with default settings in the cfg then increased/decreased.

 

Sounds like the same problem as Xeygwyn mentioned, so hoping I missed something. I figured it was the AH, though left it as I can deal with hovering a few feet and dropping cargo off. Would like to get it going for eye candy.

 

"parachute enabled in EPOCH"? I must have missed this setting?

 

 

Same here.  Everything is working well.  No BE kicks.  But the parachutes seem to be getting deleted by the game.  Vehicle ejects from the chopper, only to have the chute disappear and then the vehicle crashes into the ground.  

Link to comment
Share on other sites

Hello All,

Has anyone looked into unloading vehicles into buildings and how to prevent this from happening?

As the script allows players inside vehicles to pass through walls without any damage what so ever!

It's a glitchers fantasy.

I'll look into it today, but I was wondering if anyone else had thought about this issue.

STENCH

Link to comment
Share on other sites

Same here.  Everything is working well.  No BE kicks.  But the parachutes seem to be getting deleted by the game.  Vehicle ejects from the chopper, only to have the chute disappear and then the vehicle crashes into the ground.  

 

I'm beginning to wonder if it has to do with the set height for parachuting built-in to Epoch for the 'wearable' chutes...

Link to comment
Share on other sites

Hi,

 

See attached IgiLoad.sqf customized for our server, has been modified with some anti-glitch for no loading and unloading around EPOCH walls.

 

If you attempt to load or unload within a specified distance you will get the normal load / unload screen with a message saying there has been a malfunction due to a nearby Jammer.

IgiLoad.zip

Link to comment
Share on other sites

Hi,

 

See attached IgiLoad.sqf customized for our server, has been modified with some anti-glitch for no loading and unloading around EPOCH walls.

 

If you attempt to load or unload within a specified distance you will get the normal load / unload screen with a message saying there has been a malfunction due to a nearby Jammer.

Hi Brunz, this is great :)

 

Quick question though, you have some other edits to that file from the standard one. For the benefit of people like me that can't read the code could you tell me the lines to edit just for preventing loading/unloading near buildings. I'm guessing it's just the blocks at lines 44, 1000 & 1349 but, just wanted to make sure the others weren't important for this enhancement. 

 

Thanks again :)

Link to comment
Share on other sites

Hi Brunz, this is great :)

 

Quick question though, you have some other edits to that file from the standard one. For the benefit of people like me that can't read the code could you tell me the lines to edit just for preventing loading/unloading near buildings. I'm guessing it's just the blocks at lines 44, 1000 & 1349 but, just wanted to make sure the others weren't important for this enhancement. 

 

Thanks again :)

Hello ReDBaroM,

They are just the names of the sub categories for the buildables that are not allowed to be unloaded into.

STENCH

Link to comment
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
  • Advertisement
×
×
  • Create New...