snakeplissken 96 Posted February 1, 2020 Hello, I'm finding it difficult to add waypoint on a manned aircraft, from which that aircraft will follow the waypoint to perform some actions. What I was able to do was generate the vehicle with the custom armament; Put a name for this vehicle to be used by other commands like, _x setDamage. What I'm not getting is to give a group name to this aircraft and its crew member, because I know that to execute a waypoint by script, it is necessary to have the group name of the character. Here below are the lines inside an SQF file, where it has the command to spawn the aircraft and below the lines to create the waypoints. if (!isServer) exitWith {}; /// spawn vehicle private _grp = creategroup EAST; private _veh = createVehicle ["O_Plane_CAS_02_dynamicLoadout_F", getMarkerPos "mk1" ,[],0,"FLY"]; createVehicleCrew _veh; /// adding the crew member to the vehicle /// adding vehicle name _veh setVehicleVarName "jet1"; missionNamespace setVariable ["jet1", _veh, true]; //// adding custom weaponry private _pylons = ["PylonRack_1Rnd_Missile_AA_03_F","PylonRack_1Rnd_Missile_AGM_01_F","PylonRack_4Rnd_LG_scalpel","PylonMissile_1Rnd_Bomb_03_F","PylonMissile_1Rnd_Bomb_03_F","PylonMissile_1Rnd_Bomb_03_F","PylonMissile_1Rnd_Bomb_03_F","PylonRack_4Rnd_LG_scalpel","PylonRack_1Rnd_Missile_AGM_01_F","PylonRack_1Rnd_Missile_AA_03_F"] ; private _pylonPaths = (configProperties [configFile >> "CfgVehicles" >> typeOf _veh >> "Components" >> "TransportPylonsComponent" >> "Pylons", "isClass _x"]) apply {getArray (_x >> "turret")}; { _veh removeWeaponGlobal getText (configFile >> "CfgMagazines" >> _x >> "pylonWeapon") } forEach getPylonMagazines _veh; { _veh setPylonLoadout [_forEachIndex + 1, _x, true, _pylonPaths select _forEachIndex] } forEach _pylons; //// create waypoint private _waypoint0 = _grp addwaypoint[(getmarkerpos "Mk1"),0]; _waypoint0 setwaypointtype "Move"; _waypoint0 setWaypointStatements ["true", "this flyInHeight 300; hint 'Subindo para 300m'; this setBehaviour 'CARELESS'"]; // Executa um comando ao concluir o waypoint private _waypoint1 = _grp addwaypoint[(getmarkerpos "Mk2"),0]; _waypoint1 setwaypointtype "Move"; _waypoint1 setWaypointStatements ["true", "this flyInHeight 500; hint 'Subindo para 500m'"]; private _waypoint2 = _grp addwaypoint[(getmarkerpos "Mk3"),0]; _waypoint2 setwaypointtype "move"; _waypoint2 setWaypointStatements ["true", "this doTarget alvo; this doFire alvo"]; _waypoint2 setWaypointType "DESTROY"; private _waypoint3 = _grp addwaypoint[(getmarkerpos "Mk1"),0]; _waypoint3 setwaypointtype "move"; _waypoint3 setWaypointStatements ["true", "this land 'land'"]; [_grp, 1] setWaypointBehaviour "CARELESS"; [_grp, 1] setWaypointCombatMode "BLUE"; If anyone can tell me how to give a group name for the waypoint to work, I will be very grateful. * English is not my default language, so I use the Google translation to post here on the forum, if you find an error in the writing, forgive me. Share this post Link to post Share on other sites
beno_83au 1369 Posted February 1, 2020 Well, you've made a group but you haven't actually assigned it to anyone, or anyone to it. But look here: https://community.bistudio.com/wiki/createVehicleCrew You're already using that command to add units to the vehicle, and lucky for you that command now returns the group of the crew. So: private _grp = createVehicleCrew _veh; And carry on. 1 Share this post Link to post Share on other sites
snakeplissken 96 Posted February 1, 2020 13 hours ago, beno_83au said: Well, you've made a group but you haven't actually assigned it to anyone, or anyone to it. But look here: https://community.bistudio.com/wiki/createVehicleCrew You're already using that command to add units to the vehicle, and lucky for you that command now returns the group of the crew. So: private _grp = createVehicleCrew _veh; And carry on. Thank you very, very much! I spent three days trying to solve this alone and another day and a half looking for answers on Google and Youtube, until I decided to ask here, and thanks to your help I will be able to sleep more peacefully today. 1 Share this post Link to post Share on other sites
snakeplissken 96 Posted February 1, 2020 15 hours ago, beno_83au said: Thank you very much for your help, but I have another question here if you can help me with it too. I'm using another command (script below) that adds the driver to the vehicle. Could you tell me if there is any way to add a group to the character for be called on the waypoint lines? private _veh = createVehicle ["O_Plane_CAS_02_dynamicLoadout_F", getMarkerPos "mk1" ,[],0,"FLY"]; [ _veh, [ ["B_Fighter_Pilot_F","driver"] ] ] call BIS_fnc_initVehicleCrew; I ask about this other command, because with it I can add a character from another faction to drive the vehicle, since the command "createVehicleCrew _veh;" adds the crew of the SAME faction belonging to the vehicle. Share this post Link to post Share on other sites
pierremgi 4850 Posted February 2, 2020 Several possibilities: private _veh = createVehicle ["O_Plane_CAS_02_dynamicLoadout_F", getMarkerPos "mk1" ,[],0,"FLY"]; _crewForVeh = [ _veh, [ ["B_Fighter_Pilot_F","driver"] ] ] call BIS_fnc_initVehicleCrew; _grp = group (_crewForVeh #0); or even: _grp = group driver _veh; or, forget createVehicle then crew and just: private _grp = [getMarkerPos "mk1", WEST, ["O_Plane_CAS_02_dynamicLoadout_F"],[],[],[],[],[],0] call BIS_fnc_spawnGroup; JET1 = vehicle leader _grp; Your plane will fly and it will be WEST. Now, if you want also the west flight suit and helmet for the pilot, you need to add some lines. But if you focus on any plane flying for west side, the bis_fnc_spawngroup does the trick. 1 Share this post Link to post Share on other sites
snakeplissken 96 Posted February 2, 2020 12 minutes ago, pierremgi said: Several possibilities: private _veh = createVehicle ["O_Plane_CAS_02_dynamicLoadout_F", getMarkerPos "mk1" ,[],0,"FLY"]; _crewForVeh = [ _veh, [ ["B_Fighter_Pilot_F","driver"] ] ] call BIS_fnc_initVehicleCrew; _grp = group (_crewForVeh #0); or even: _grp = group driver _veh; or, forget createVehicle then crew and just: private _grp = [getMarkerPos "mk1", WEST, ["O_Plane_CAS_02_dynamicLoadout_F"],[],[],[],[],[],0] call BIS_fnc_spawnGroup; JET1 = vehicle leader _grp; Your plane will fly and it will be WEST. Now, if you want also the west flight suit and helmet for the pilot, you need to add some lines. But if you focus on any plane flying for west side, the bis_fnc_spawngroup does the trick. Colleague, thank you very much! I tested it with the first two tips and it works perfectly. Now I can add another tutorial video to my the channel, from which I teach beginners in the ArmA 3 world to create their missions. 1 Share this post Link to post Share on other sites