cernia68 0 Posted April 1, 2024 i have a trouble i spawned ai with this in a trigger call{_infgrp = [getMarkerPos "SpawnINF", east, ["O_Soldier_SL_F", "O_Soldier_LAT_F","O_Soldier_TL_F", "O_Soldier_M_F","O_medic_F", "O_crew_F", "O_engineer_F", "O_Soldier_A_F"],0] call BIS_fnc_spawnGroup}; but i can t delete it if i want ..... only find that is working but delete all opfor in map trigger 2 {if (side _x == opfor) then {deleteVehicle _x}} forEach allUnits; Share this post Link to post Share on other sites
Larrow 2826 Posted April 2, 2024 Use setVariable to store the spawned group somewhere, e.g either missionNamespace or on the trigger, so you then have access to it from the other trigger. Spoiler //Trigger 1, spawn group missionNamespace setVariable[ "TrigGroup", [getMarkerPos "SpawnINF", east, ["O_Soldier_SL_F", "O_Soldier_LAT_F","O_Soldier_TL_F", "O_Soldier_M_F","O_medic_F", "O_crew_F", "O_engineer_F", "O_Soldier_A_F"],0] call BIS_fnc_spawnGroup, true ] //Trigger 2, delete group if !( isNil "TrigGroup" ) then { { deleteVehicle _x; }forEach units TrigGroup; deleteGroup TrigGroup; missionNamespace setVariable[ "TrigGroup", nil, true ]; }; 1 Share this post Link to post Share on other sites