Jump to content

Recommended Posts

I'm editing a script where a heli drop a cargo. i want change heli to airplane, C130, but always after the plane drop the cargo, him always crash!! anyone can give me a idea? 

Share this post


Link to post
Share on other sites

What script, can you post it, lots of things can cause an AI to crash...

Share this post


Link to post
Share on other sites

From what I've been seeing the past few days trying to use the C130 from CUP for this very purpose, it's that the AI just can't fly that big cargo plane very well. They drop their speed too much and then drop out of the sky like a rock, and they completely ignore any height commands.

Share this post


Link to post
Share on other sites

From what I've been seeing the past few days trying to use the C130 from CUP for this very purpose, it's that the AI just can't fly that big cargo plane very well. They drop their speed too much and then drop out of the sky like a rock, and they completely ignore any height commands.

 

Indeed. I assume the AI in A3 can't handle slow planes anymore. I would suggest using setSpeed so ease the slow down of the plane (make it faster).

  • Like 1

Share this post


Link to post
Share on other sites
Guest

Yeah, it is possible because playerunknown did it in battle royale. Idk if the plane drops a lot.

You can also use setVelocity.

Share this post


Link to post
Share on other sites

Yeah, it is possible because playerunknown did it in battle royale. Idk if the plane drops a lot.

You can also use setVelocity.

 

Indeed. I assume the AI in A3 can't handle slow planes anymore. I would suggest using setSpeed so ease the slow down of the plane (make it faster).

 

where do i put the setVelocity? i'm trying and when the map pops up to select position i get stuck and can't close the map.

I'm trying put like this: _supplyHeli setVelocity [20, 0, 0]   ... is that correct?

script:

/*

TUTORIAL

*/

_supplyBoxFnc = _this select 1;

_supplyCargoFnc = _this select 2;

openMap [true,true];

clicked = 0;

//hintc "Left click on the map where you want the supplies dropped";

["supplymapclick", "onMapSingleClick", {

_supplyLocArray = [+1000,-1375,-1500,-1125,+1250,-1000,+1375,-1250,+1500,+1125];

//:::::::::::|USE THE ONE BELOW FOR TESTING, IT SPAWNS THE HELI MUCH CLOSER|:::::::::::

// _supplyLocArray = [+500,-500];

_supplyRandomLocX = _supplyLocArray select floor random count _supplyLocArray;

_supplyRandomLocY = _supplyLocArray select floor random count _supplyLocArray;

_supply = [[(_pos select 0)+_supplyRandomLocX,

(_pos select 1)+_supplyRandomLocY,

(_pos select 2)+50], 180, "sab_C130_H_CSAT3", WEST] call bis_fnc_spawnvehicle; 

_supplyHeli = _supply select 0;

_supplyHeliPos = getPos _supplyHeli;

_supplyMrkrHeli = createMarker ["supplyMrkrHeli", _supplyHeliPos];

_supplyCrew = _supply select 1;

_supplyGrp = _supply select 2;

_supplyGrp setSpeedMode "FULL";

_supplyGrp setBehaviour "CARELESS";

_supplyWP1 =_supplyGrp addWaypoint [(_pos),1];

_supplyWP1 setWaypointType "MOVE";

_supplyWP2 = _supplyGrp addWaypoint [[(_pos select 0)+_supplyRandomLocX,

(_pos select 1)+_supplyRandomLocY,

_pos select 2], 2];

_supplyMrkrLZ = createMarker ["supplyMrkrLZ", _pos];

"supplyMrkrLZ" setMarkerType "Empty";

"supplyMrkrHeli" setMarkerType "Empty";

_supplyHeli flyInHeight 150;

clicked = 1;

openmap [false,false];

onMapSingleClick '';}] call BIS_fnc_addStackedEventHandler;

waitUntil {(clicked == 1)};

hint "The supplies are on the way";

_supplyMrkrHeliPos = getMarkerPos "supplyMrkrHeli";

_supplyMrkrHeliPos2 = [_supplyMrkrHeliPos select 0,

_supplyMrkrHeliPos select 1,

(_supplyMrkrHeliPos select 2)+50];

_supplyHeli = _supplyMrkrHeliPos2 nearestObject "sab_C130_H_CSAT3";

_supplyMrkrLZPos = getMarkerPos "supplyMrkrLZ";

_supplyLZ = createVehicle ["Land_Laptop_device_F", getMarkerPos "supplyMrkrLZ", [], 0, "NONE"];

deleteMarker "supplyMrkrHeli";

deleteMarker "supplyMrkrLZ";

_supplyLZ hideObject true;

waitUntil {( _supplyLZ distance _supplyHeli)<400};

_supplyHeli animateDoor ["CargoRamp_Open",1];

waitUntil {( _supplyLZ distance _supplyHeli)<200};

sleep 2;

_supplyHeli allowDammage false;

_supplyBox = createVehicle

[_supplyBoxFnc, position _supplyHeli, [], 0, "CAN_COLLIDE"];

clearBackpackCargoGlobal _supplyBox;

clearWeaponCargoGlobal _supplyBox;

clearMagazineCargoGlobal _supplyBox;

clearItemCargoGlobal _supplyBox;

//_supplyBox addAction ["Open Garage",{_pos = [ player, 30, getDir player ] call BIS_fnc_relPos; BIS_fnc_garage_center = createVehicle [ "Land_HelipadEmpty_F", _pos, [], 0, "CAN_COLLIDE" ]; [ "Open", true ] call BIS_fnc_garage;}];

//Virtual Vehicle Arsenal

_supplyBox addAction ["Virtual Arsenal", {["Open",true] spawn BIS_fnc_arsenal}]; //put here to open VA

_supplyBox disableCollisionWith _supplyHeli;

_supplyHeli disableCollisionWith _supplyBox;

_supplyBox allowDammage false;

_supplyBox attachTo [_supplyHeli, [0, 0, 0], "CargoRamp"];

_supplyBox setDir ([_supplyBox, _supplyHeli] call BIS_fnc_dirTo);

detach _supplyBox;

deleteVehicle _supplyLZ;

[_supplyBox,_supplyCargoFnc,nil,true] spawn BIS_fnc_MP;

[_supplyBox,"FncSupplyLight",nil,true] spawn BIS_fnc_MP;

_supplyChute = createVehicle ["B_parachute_02_F", position _supplyBox, [], 0, "CAN_COLLIDE"];

_supplyBox attachTo [_supplyChute,[0,0,-0.5]];

_supplyChute hideObject true;

_supplyChute setPos getPos _supplyBox;

//:::::::::::|LIGHT|:::::::::::

_supplyLight = "Chemlight_green" createVehicle (position _supplyBox);

_supplyLight attachTo [_supplyBox, [0,0,0]];

//:::::::::::::::::::::::::::::

sleep 1;

hint "The supplies have been dropped";

_supplyChute hideObject false;

_supplyHeli allowDammage true;

_supplyBox allowDammage true;

_supplyHeli animateDoor ["CargoRamp_Open",0];

//:::::::::::|SMOKE|:::::::::::

_supplySmoke = "SmokeShellYellow" createVehicle (position _supplyBox);

_supplySmoke attachTo [_supplyBox, [0,0,0]];

//:::::::::::::::::::::::::::::

waitUntil {(getPos _supplyBox select 2)<2};

detach _supplyBox;

_supplyChute setPos [ (getPos _supplyChute select 0)+0.75, getPos _supplyChute select 1, getPos _supplyChute select 2];

hint "";

sleep 5;

{deleteVehicle _x;}forEach crew _supplyHeli;deleteVehicle _supplyHeli;

//hint "end";

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

×