yoannis1995
Member-
Content Count
95 -
Joined
-
Last visited
-
Medals
Community Reputation
10 GoodAbout yoannis1995
-
Rank
Corporal
-
Helicopter extraction script
yoannis1995 replied to yoannis1995's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ok I tried to change the way of getting the group in the helicopter by using a waypoint but it doesn't change anything. I tried to make the units of the group playable units so I can see if they get the order to get in but it doesn't work either... And I don't understand because I'm gettin the hint "group 2 ok" which I'm supposed to get once they're on board. Here's the actuall full script: // Starting _initiate = _this select 0; _smoke = _this select 1; //initiate map click + smoke if (_initiate && _smoke) exitWith { hint "Click on the map or throw a smoke grenade to call the helicopter for extraction"; onMapSingleClick "nul=[false,false,_pos] execVM 'extract.sqf'; onMapSingleClick ''; player removeEventHandler ['fired',0];"; tabfumis = ["SmokeShellYellow","SmokeShellRed","SmokeShellGreen","SmokeShellPurple","SmokeShellBlue","SmokeShellOrange","1Rnd_SmokeRed_Grenade_shell","1Rnd_SmokeGreen_Grenade_shell", "1Rnd_SmokeYellow_Grenade_shell","1Rnd_SmokePurple_Grenade_shell","1Rnd_SmokeBlue_Grenade_shell","1Rnd_SmokeOrange_Grenade_shell","3Rnd_SmokeRed_Grenade_shell","3Rnd_SmokeGreen_Grenade_shell", "3Rnd_SmokeYellow_Grenade_shell","3Rnd_SmokePurple_Grenade_shell","3Rnd_SmokeBlue_Grenade_shell","3Rnd_SmokeOrange_Grenade_shell"]; player addEventHandler["fired", { hint "fired"; _mag = _this select 5; _obj = _this select 6; if (_mag in tabfumis) then { _positonfumi = []; sleep 8; _positionfumi = getpos _obj; nul=[false,true,_positionfumi] execVM "extract.sqf"; hint "smoke detected"; player removeEventHandler ["fired",0]; onMapSingleClick ""; }; }]; }; //initiate map click only if (_initiate) exitWith { hint "Click on the map to call the helicopter for extraction"; onMapSingleClick "nul=[false,false,_pos] execVM 'extract.sqf'; onMapSingleClick '';"; }; //initate done if (! _initiate) then { hint "Position recieved"; _landpos = []; //finding suitable position _center = _this select 2; _findGoodSpot = true; _maxdist = 50; // max initial range from below position to search for LZ. while {_findGoodSpot} do { _posTemp = [_center, 0, _maxdist, 8, 0, 0.5, 0] call BIS_fnc_findSafePos; _maxdist = _maxdist + 10; // add to the range to check if no LZ found. sleep 1; _string = format _posTemp; sleep 1; if (!isNil ("_string")) then { _landpos = _posTemp; _findGoodSpot = false; hint "position found"; }; }; _side = WEST; _pos = getMarkerPos "heli_start"; _marker = createMarker ["pickup", _landpos]; _marker setMarkerColor "ColorGreen"; _marker setMarkerType "mil_pickup"; _pad = createVehicle ["Land_HelipadEmpty_F", _landpos, [], 0, "NONE"]; //Creating helicopter _vehicle = [_pos, 0, "B_Heli_Transport_01_F", WEST] call bis_fnc_spawnvehicle; _veh = _vehicle select 0; _vehCrew = _vehicle select 1; _grpheli = _vehicle select 2; _vehDriver = driver _veh; _veh setpos [getpos _veh select 0,getpos _veh select 1,0]; //Creating defensive group _units = ["B_Soldier_SL_F","B_Soldier_F","B_Soldier_GL_F","B_Soldier_F"]; _grp = [_pos, _side, _units, [], [], [0.8]] call BIS_fnc_spawnGroup; {_x assignAsCargo _veh; _x moveInCargo _veh; setPlayable _x;} forEach units _grp; //Creating helicopter WPs _Hwp0 = _grpheli addWaypoint [_landpos, 0]; _Hwp0 setWaypointType "TR UNLOAD"; _Hwp0 setWaypointStatements ["true", "doStop (driver this); (vehicle this) engineOn true;"]; _Hwp0 setWaypointBehaviour "AWARE"; _Hwp0 setWaypointCombatMode "GREEN"; _veh setCombatMode "GREEN"; _veh setBehaviour "AWARE"; //Creating defensive group WPs Gready = false; _Gwp0 = _grp addWaypoint [_landpos, 0]; _Gwp0 setWaypointType "GETOUT"; _Gwp0 synchronizeWaypoint [_grpheli, 0]; _Gwp0 setWaypointStatements ["true", "Gready = true;"]; _Gwp0 setWaypointBehaviour "AWARE"; _Gwp0 setWaypointCombatMode "GREEN"; _grp setCombatMode "GREEN"; _grp setBehaviour "AWARE"; //Moving into defense position waitUntil {Gready}; hint "ready"; _d = direction _veh; _arrayunits = []; _arrayunits = units _grp; { _grouptmp = createGroup WEST; [_x] join _grouptmp; _movepos = [_veh, 3, _d] call BIS_fnc_relPos; _x doMove _movepos; _d = _d + 90; } forEach _arrayunits; sleep 10; { doStop _x; _x setUnitPos "middle"; _x setSpeedMode "LIMITED"; _x setCombatMode "YELLOW"; sleep 1; } forEach _arrayunits; //Waiting for the player's group to get in waituntil {{_x in _veh}count units group player == {alive _x} count units group player}; hint "group player ok"; //Boarding defensive group { _grouptmp = group _x; [_x] join _grp; deleteGroup _grouptmp; } forEach _arrayunits; _Gwp1 = _grp addWaypoint [_landpos, 1]; _Gwp1 setWaypointType "GETIN NEAREST"; waituntil {{_x in _veh}count units _grp == {alive _x} count units _grp}; hint "group 2 ok"; //Moving and unloading player's group //Moving and deleting helicopter }; Any ideas ?!:( -
Helicopter extraction script
yoannis1995 replied to yoannis1995's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Any ideas ?! -
Helicopter extraction script
yoannis1995 replied to yoannis1995's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I could but I don't really need to, the IA does that job just fine! But still can't solve the problem off the group getting back in the helicopter... It's weird that works: //Creating defensive group _side = WEST; _pos = getMarkerPos "heli_start"; _units = ["B_Soldier_SL_F","B_Soldier_F","B_Soldier_GL_F","B_Soldier_F"]; _grp = [_pos, _side, _units, [], [], [0.8]] call BIS_fnc_spawnGroup; //Moving into defense position _d = direction heli1; _arrayunits = []; _arrayunits = units _grp; { _grouptmp = createGroup WEST; [_x] join _grouptmp; _movepos = [heli1, 3, _d] call BIS_fnc_relPos; _x doMove _movepos; _d = _d + 90; } forEach _arrayunits; sleep 10; { doStop _x; _x setUnitPos "middle"; _x setSpeedMode "LIMITED"; _x setCombatMode "YELLOW"; sleep 1; } forEach _arrayunits; waituntil {{_x in heli1}count units group player == {alive _x} count units group player}; hint "group player ok"; //Boarding defensive group { _grouptmp = group _x; [_x] join _grp; deleteGroup _grouptmp; _x assignAsCargo heli1; [_x] orderGetIn true; } forEach _arrayunits; waituntil {{_x in heli1}count units _grp == {alive _x} count units _grp}; hint "group 2 ok"; But in the full version it doesn't... : // Starting _initiate = _this select 0; _smoke = _this select 1; //initiate map click + smoke if (_initiate && _smoke) exitWith { hint "Click on the map or throw a smoke grenade to call the helicopter for extraction"; onMapSingleClick "nul=[false,false,_pos] execVM 'extract.sqf'; onMapSingleClick ''; player removeEventHandler ['fired',0];"; tabfumis = ["SmokeShellYellow","SmokeShellRed","SmokeShellGreen","SmokeShellPurple","SmokeShellBlue","SmokeShellOrange","1Rnd_SmokeRed_Grenade_shell","1Rnd_SmokeGreen_Grenade_shell", "1Rnd_SmokeYellow_Grenade_shell","1Rnd_SmokePurple_Grenade_shell","1Rnd_SmokeBlue_Grenade_shell","1Rnd_SmokeOrange_Grenade_shell","3Rnd_SmokeRed_Grenade_shell","3Rnd_SmokeGreen_Grenade_shell", "3Rnd_SmokeYellow_Grenade_shell","3Rnd_SmokePurple_Grenade_shell","3Rnd_SmokeBlue_Grenade_shell","3Rnd_SmokeOrange_Grenade_shell"]; player addEventHandler["fired", { hint "fired"; _mag = _this select 5; _obj = _this select 6; if (_mag in tabfumis) then { _positonfumi = []; sleep 8; _positionfumi = getpos _obj; nul=[false,true,_positionfumi] execVM "extract.sqf"; hint "smoke detected"; player removeEventHandler ["fired",0]; onMapSingleClick ""; }; }]; }; //initiate map click only if (_initiate) exitWith { hint "Click on the map to call the helicopter for extraction"; onMapSingleClick "nul=[false,false,_pos] execVM 'extract.sqf'; onMapSingleClick '';"; }; //initate done if (! _initiate) then { hint "Position recieved"; _landpos = []; //finding suitable position _center = _this select 2; _findGoodSpot = true; _maxdist = 50; // max initial range from below position to search for LZ. while {_findGoodSpot} do { _posTemp = [_center, 0, _maxdist, 8, 0, 0.5, 0] call BIS_fnc_findSafePos; _maxdist = _maxdist + 10; // add to the range to check if no LZ found. sleep 1; _string = format _posTemp; sleep 1; if (!isNil ("_string")) then { _landpos = _posTemp; _findGoodSpot = false; hint "position found"; }; }; _side = WEST; _pos = getMarkerPos "heli_start"; _marker = createMarker ["pickup", _landpos]; _marker setMarkerColor "ColorGreen"; _marker setMarkerType "mil_pickup"; _pad = createVehicle ["Land_HelipadEmpty_F", _landpos, [], 0, "NONE"]; //Creating helicopter _vehicle = [_pos, 0, "B_Heli_Transport_01_F", WEST] call bis_fnc_spawnvehicle; _veh = _vehicle select 0; _vehCrew = _vehicle select 1; _grpheli = _vehicle select 2; _vehDriver = driver _veh; _veh setpos [getpos _veh select 0,getpos _veh select 1,0]; //Creating defensive group _units = ["B_Soldier_SL_F","B_Soldier_F","B_Soldier_GL_F","B_Soldier_F"]; _grp = [_pos, _side, _units, [], [], [0.8]] call BIS_fnc_spawnGroup; {_x assignAsCargo _veh; _x moveInCargo _veh;} forEach units _grp; //Creating helicopter WPs _Hwp0 = _grpheli addWaypoint [_landpos, 0]; _Hwp0 setWaypointType "TR UNLOAD"; _Hwp0 setWaypointStatements ["true", "doStop (driver this); (vehicle this) engineOn true;"]; _Hwp0 setWaypointBehaviour "AWARE"; _Hwp0 setWaypointCombatMode "GREEN"; _veh setCombatMode "GREEN"; _veh setBehaviour "AWARE"; //Creating defensive group WPs Gready = false; _Gwp0 = _grp addWaypoint [_landpos, 0]; _Gwp0 setWaypointType "GETOUT"; _Gwp0 synchronizeWaypoint [_grpheli, 0]; _Gwp0 setWaypointStatements ["true", "Gready = true;"]; _Gwp0 setWaypointBehaviour "AWARE"; _Gwp0 setWaypointCombatMode "GREEN"; _grp setCombatMode "GREEN"; _grp setBehaviour "AWARE"; //Moving into defense position waitUntil {Gready}; hint "ready"; _d = direction _veh; _arrayunits = []; _arrayunits = units _grp; { _grouptmp = createGroup WEST; [_x] join _grouptmp; _movepos = [_veh, 3, _d] call BIS_fnc_relPos; _x doMove _movepos; _d = _d + 90; } forEach _arrayunits; sleep 10; { doStop _x; _x setUnitPos "middle"; _x setSpeedMode "LIMITED"; _x setCombatMode "YELLOW"; sleep 1; } forEach _arrayunits; //Waiting for the player's group to get in waituntil {{_x in _veh}count units group player == {alive _x} count units group player}; hint "group player ok"; //Boarding defensive group { _grouptmp = group _x; [_x] join _grp; deleteGroup _grouptmp; _x assignAsCargo _veh; [_x] orderGetIn true; } forEach _arrayunits; waituntil {{_x in _veh}count units _grp == {alive _x} count units _grp}; hint "group 2 ok"; //Moving and unloading player's group //Moving and deleting helicopter }; Even if I replace "_x assignAsCargo _veh;" by "_x assignAsCargo heli1;"... Help please !!! :( -
Helicopter extraction script
yoannis1995 replied to yoannis1995's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Well your script didn't really work for me but I had made part of the moving script and took some part of yours. Now I've got that: //Creating defensive group WPs Gready = false; _Gwp0 = _grp addWaypoint [_landpos, 0]; _Gwp0 setWaypointType "GETOUT"; _Gwp0 synchronizeWaypoint [_grpheli, 0]; _Gwp0 setWaypointStatements ["true", "Gready = true;"]; _Gwp0 setWaypointBehaviour "AWARE"; _Gwp0 setWaypointCombatMode "GREEN"; _grp setCombatMode "GREEN"; _grp setBehaviour "AWARE"; //Moving into defense position waitUntil {Gready}; hint "ready"; _d = direction _veh; _arrayunits = []; _arrayunits = units _grp; { _grouptmp = createGroup WEST; [_x] join _grouptmp; _movepos = [_veh, 3, _d] call BIS_fnc_relPos; _x doMove _movepos; _d = _d + 90; } forEach _arrayunits; { _timeout = time + 80; waitUntil {moveToCompleted _x or moveToFailed _x or !alive _x or _timeout < time}; doStop _x; _x setUnitPos "middle"; _x setSpeedMode "LIMITED"; _x setCombatMode "YELLOW"; sleep 1; } forEach _arrayunits; //Waiting for the player's group to get in waituntil {{_x in _veh}count units group player == {alive _x} count units group player}; hint "group player ok"; //Boarding defensive group { _grouptmp = group _x; [_x] join _grp; deleteGroup _grouptmp; _x assignAsCargo _veh; [_x] orderGetIn true; } forEach _arrayunits; waituntil {{_x in _veh}count units _grp == {alive _x} count units _grp}; hint "group 2 ok"; There are now 2 problems. Half of the units of the group will wait for the "_timeout" to pass to kneel. And the second problem is once the group of the player has boarded the helicopter the other group still won't move and get in the helo... Any ideas how to fix that ?! -
Helicopter extraction script
yoannis1995 replied to yoannis1995's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ok, I found a way of doing it ! But now I would like to select the units of the group one by one so I can make each one of them move to a different position. How do I do that ? Also that part doesn't work: {_x assignAsCargo _veh; [_x] orderGetIn true;} forEach units _grp; waituntil {{_x in _veh}count units _grp == {alive _x} count units _grp}; I'm guessing it's a problem due to variables but how can I make it work ? -
Helicopter extraction script
yoannis1995 replied to yoannis1995's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ok thanks guys :) I took barbolani's script. So now I've got that: // Starting _side = WEST; _pos = getMarkerPos "heli_start"; _landpos = getMarkerPos "move_heli"; _pad = createVehicle ["Land_HelipadEmpty_F", _landpos, [], 0, "NONE"]; _movepos = [(_landpos select 0) + 1,(_landpos select 1) + 2,0]; //Creating helicopter _vehicle = [_pos, 0, "B_Heli_Transport_01_F", WEST] call bis_fnc_spawnvehicle; _veh = _vehicle select 0; _vehCrew = _vehicle select 1; _grpheli = _vehicle select 2; _vehDriver = driver _veh; _veh setpos [getpos _veh select 0,getpos _veh select 1,0]; //Creating defensive group _units = ["B_Soldier_SL_F","B_Soldier_F","B_Soldier_GL_F","B_Soldier_F"]; _grp = [_pos, _side, _units, [], [], 0.8] call BIS_fnc_spawnGroup; {_x assignAsCargo _veh; _x moveInCargo _veh;} forEach units _grp; //Creating helicopter WPs _Hwp0 = _grpheli addWaypoint [_landpos, 0]; _Hwp0 setWaypointType "TR UNLOAD"; _Hwp0 setWaypointStatements ["true", "doStop (driver this); (vehicle this) engineOn true;"]; _Hwp0 setWaypointBehaviour "CARELESS"; _veh setBehaviour "CARELESS"; _veh disableAI "AUTOTARGET"; //Creating defensive group WPs _Gwp0 = _grp addWaypoint [_landpos, 0]; _Gwp0 setWaypointType "GETOUT"; _Gwp0 synchronizeWaypoint [_grpheli, 0]; _Gwp1 = _grp addWaypoint [_landpos, 1]; _Gwp1 setWaypointType "MOVE"; _Gwp1 setWaypointStatements ["true", "(vehicle this) land 'land'; (vehicle this) engineOn true;"]; So up until there everything is working fine :) But now, I don't know if it is possible and how, I'd like to have the 4 units of the group getting out of the helicopter defending it. So I'd like to make move one of them in front of the helicopter, 1 on each side and 1 at the back off it. Is it possible to get those 4 positions related to the position of the helicopter ? -
Helicopter extraction script
yoannis1995 replied to yoannis1995's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ok now I've got that: _side = WEST; _grp2 = createGroup WEST; _pos = getMarkerPos "heli_start"; _pad = "Land_HelipadEmpty_F" createVehicle _pos; _veh = createVehicle ["B_Heli_Transport_01_F", _pos, [], 270, "FLY"]; _pilot = _grp2 createUnit ["B_Pilot_F",_pos,[],0,"FORM"]; _pilot assignasdriver _veh; _pilot moveindriver _veh; _veh flyinheight 150; _units = ["B_Soldier_SL_F","B_Soldier_F","B_Soldier_GL_F","B_Soldier_F"]; _grp = [_pos, _side, _units, [], [], 0.8] call BIS_fnc_spawnGroup; {_x moveincargo _veh;} foreach units _grp; _wp1 = _grp2 addWaypoint [getMarkerPos "move_heli", 0]; [_grp2, 0] setWaypointType "TR UNLOAD"; _wp1 setWaypointStatements ["true", "_veh land 'LAND'; {_x setUnitPos 'middle'; _x setSpeedMode 'LIMITED'; _x setCombatMode 'YELLOW';}foreach units _grp1;"]; _wp2 = _grp2 addWaypoint [getMarkerPos "move_heli", 1]; [_grp2, 1] setWaypointType "LAND"; _wp2 setWaypointStatements ["true", "doStop _pilot;"]; waitUntil {{vehicle _x = _veh} forEach units group player && {vehicle _x = _veh} forEach units _grp}; So the helicopter will move to the position but it doesn't land and the units inside don't get out.... Also how can I get a right door gunner and a copilot in the helicopter ? With the command "MoveInGunner" I only get a left door gunner... -
Hi, I'm trying to make a script for an extraction by helicopter with units disembarking the helicopter and protecting it while waiting for the player and its group to go on board. Here's the beginning of the script: _veh = [getMarkerPos "heli_start", 0, "B_Heli_Transport_01_F", west] call BIS_fnc_spawnVehicle; createVehicleCrew (_veh select 0); sleep 3; _grp1 = createGroup west; _qrf1 = "B_Soldier_SL_F" createUnit [getMarkerPos "heli_start", _grp1,"this MoveInCargo _veh;", 0.6, "corporal"]; _qrf2 = "B_Soldier_F" createUnit [getMarkerPos "heli_start", _grp1,"this MoveInCargo _veh;", 0.6]; _qrf3 = "B_Soldier_GL_F" createUnit [getMarkerPos "heli_start", _grp1,"this MoveInCargo _veh;", 0.6]; _qrf4 = "B_Soldier_F" createUnit [getMarkerPos "heli_start", _grp1,"this MoveInCargo _veh;", 0.6]; _qrfArray = []; _qrfArray = [qrf4,qrf3,qrf2,qrf1]; _driver = driver _veh; _grp2 = group _driver; _wp1 = _grp2 addWaypoint [getMarkerPos "move_heli", 0]; [_grp2, 0] setWaypointType "TR UNLOAD"; _wp1 setWaypointStatements ["true", "_veh land 'LAND'; {_x setUnitPos 'middle'; _x setSpeedMode 'LIMITED'; _x setCombatMode 'YELLOW';}foreach units _grp1;"]; _wp2 = _grp2 addWaypoint [getMarkerPos "move_heli", 1]; [_grp2, 1] setWaypointType "LAND"; doStop _driver; waitUntil {{vehicle _x = _veh} forEach units group player && {vehicle _x = _veh} forEach units _grp1}; And also the 2 first problems... :P First the units of the group _grp1 are not in the helicopter but on the ground. And secondly, the helicopter is not moving to its given waypoint but staying static in the air instead. How can I fix this ?
-
UAV terminal issue
yoannis1995 replied to yoannis1995's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Finaly found the problem. Turns out it came from the script generated by the new Arma 3 virtual armory I used to set up the loadouts of my units. It appeared to be written: delta1 addWeapon "B_UavTerminal"; ... delta1 linkItem "O_UavTerminal"; instead of both "B_UavTerminal". Thanks anyway guys :) -
UAV terminal issue
yoannis1995 replied to yoannis1995's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yes it is, that's why I don't understand why it works for the other units and not the player... -
UAV terminal issue
yoannis1995 replied to yoannis1995's topic in ARMA 3 - MISSION EDITING & SCRIPTING
No, a diver but I checked with other divers and it works.... -
Hi, As the tittle says, I'm having an issue with the UAV terminal. I made all the loadouts of my units for a mission by script and the one who is supposed to be the player doesn't have the option to use the UAV terminal even though he has it. I checked with the other units and it works for them but not for the player. Any idea why ?
-
Hi, I'm trying to create a flying drone with a script but I can't get it to work... If I use the command CreateVehicle the drone appears empty and crashes and if I use the function SpawnVehicle like this: [getMarkerPos uav1, 180, "B_UAV_02_F", WEST] call bis_fnc_spawnvehicle; I get an error message ("0 elements provided, 3 expected...") and it doesn't work... How can I fix that ?
-
Hi, I've just tried to use VAC to command my units using this profile: http://forums.bistudio.com/showthread.php?150814-Voice-Activation-for-Arma-3-via-VAC-Builder-Profile-and-other-software&highlight=voice But half the commands don't work. For exemple I can't select the unit 8 or 9, doesn't do anything. Other exemple, when I say "2, 3, 4 assign team blue" It makes them go stealth or once when I said "5, return to formation" it made him drop his backpack... I don't understand why it doesn't work because it seems to be working just fine on the differents videos we can find... :/ Any ideas how to fix it ?! Thanks :)
-
Hi, I'm trying to attach IR grenades to units with this code: {_ir = "B_IR_Grenade" createVehicle [0,0,0]; _ir attachTo [_x, [0,-0.03,0.07], "LeftShoulder"];} forEach units group player But it doesn't work even though it works with the exact same code and chemlights instead of IR grenades... Any idea how to make it work ?!