xtesic 10 Posted June 22, 2014 hi, I posted this a few days ago, but in the wrongsection it seems...srry beerkan and thx for telling. My problem is that i want blufor activates a trigger and in that trigger command as activation blufor, i want a zamak transport WITH units in it to spawn and drive to a waypoint. Alrdy tried moveincargo, and now beerkans script, but i fail, fail fail...maybe im stupid :) but if someone can help me with this, i do not want to use outside scripts, so it need to be a script put inside the trigger activation command. this is from last try: it says : missing ] Tried that, didnt work, says : missing ] When adding ] it keeps saying: missing ] just wanna spawn a loaded zamak moving to a wp ....GRRRRRR This is what i have now: if (!isServer) exitWith {} ; transport1 = [getmarkerpos "mk20", EAST, ["O_Truck_02_transport_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup; wp20 = transport1 addWaypoint [getmarkerpos "wp20", 0]; wp20 setWaypointType "MOVE"; wp20 setWaypointSpeed "NORMAL"; wp20 setWaypointBehaviour "AWARE"; rifle21 = [getmarkerpos "mk21", EAST, ["O_Soldier_AR_F","O_Soldier_AR_F","O_Soldier_GL_F" ,"O_Soldier_GL_F","O_Soldier_lite_F","O_Soldier_li te_F"],[],[],[],[],[],230] call BIS_fnc_spawnGroup; (_x moveInCargo transport1; } foreach units rifle21; Share this post Link to post Share on other sites
TittErS 13 Posted June 22, 2014 Hi, You have an error : (_x moveInCargo transport1; } foreach units rifle21; replace by : {_x moveInCargo transport1; } foreach units rifle21; Share this post Link to post Share on other sites
xtesic 10 Posted June 22, 2014 changed it to: But still doesnt work, it spawns a zamak + troops, but troops not in zamak... if (!isServer) exitWith {} ; transport1 = [getmarkerpos "mk20", EAST, ["O_Truck_02_transport_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup; wp20 = transport1 addWaypoint [getmarkerpos "wp20", 0]; wp20 setWaypointType "MOVE"; wp20 setWaypointSpeed "NORMAL"; wp20 setWaypointBehaviour "AWARE"; rifle21 = [getmarkerpos "mk21", EAST, ["O_Soldier_AR_F","O_Soldier_AR_F","O_Soldier_GL_F" ,"O_Soldier_GL_F","O_Soldier_lite_F","O_Soldier_li te_F"],[],[],[],[],[],230] call BIS_fnc_spawnGroup; {_x moveInCargo transport1; } foreach units rifle21; Share this post Link to post Share on other sites
Jona33 51 Posted June 22, 2014 Does it have to be? {_x moveInCargo} foreach units rifle 21; , shouldn't it be? {_x moveInCargo} foreach rifle 21; Share this post Link to post Share on other sites
TittErS 13 Posted June 22, 2014 @Jona33 : BIS_fnc_spawnGroup return a Group no an Array. :) if (!isServer) exitWith {} ; transport1 = [getmarkerpos "mk20", EAST, ["O_Truck_02_transport_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup; wp20 = transport1 addWaypoint [getmarkerpos "wp20", 0]; wp20 setWaypointType "MOVE"; wp20 setWaypointSpeed "NORMAL"; wp20 setWaypointBehaviour "AWARE"; rifle21 = [getmarkerpos "mk21", EAST, ["O_Soldier_AR_F","O_Soldier_AR_F","O_Soldier_GL_F" ,"O_Soldier_GL_F","O_Soldier_lite_F","O_Soldier_li te_F"],[],[],[],[],[],230] call BIS_fnc_spawnGroup; { _x moveInCargo vehicle ((units transport1) select 0); } foreach units rifle21; 1 Share this post Link to post Share on other sites
Beerkan 71 Posted June 22, 2014 rifle21 = [getmarkerpos "mk21", EAST, ["O_Soldier_AR_F","O_Soldier_AR_F","O_Soldier_GL_F" ,"O_Soldier_GL_F","O_Soldier_lite_F","O_Soldier_li te_F"],[],[],[],[],[],230] call BIS_fnc_spawnGroup; There's an incorrect extra space in the above line too. "O_Soldier_li te_F" should be "O_Soldier_lite_F" Share this post Link to post Share on other sites
KC Grimes 79 Posted June 23, 2014 Be sure to assignAsCargo as well. Share this post Link to post Share on other sites
xtesic 10 Posted June 23, 2014 (edited) assignscargo..where and how? because the new script isnt working aswell.. it doesnt spawn anything now.... if (!isServer) exitWith {} ; transport1 = [getmarkerpos "mk20", EAST, ["O_Truck_02_transport_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup; wp20 = transport1 addWaypoint [getmarkerpos "wp20", 0]; wp20 setWaypointType "MOVE"; wp20 setWaypointSpeed "NORMAL"; wp20 setWaypointBehaviour "AWARE"; rifle21 = [getmarkerpos "mk21", EAST, ["O_Soldier_AR_F","O_Soldier_AR_F","O_Soldier_GL_F" ,"O_Soldier_GL_F","O_Soldier_lite_F","O_Soldier_lite_F"],[],[],[],[],[],230] call BIS_fnc_spawnGroup; { _x moveInCargo vehicle ((units transport1) select 0); } foreach units rifle21; and tried this also, says missing: blank="nothing" if (!isServer) exitWith {} ; transport1 = [getmarkerpos "mk20", EAST, ["O_Truck_02_transport_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup; wp20 = transport1 addWaypoint [getmarkerpos "wp20", 0]; wp20 setWaypointType "MOVE"; wp20 setWaypointSpeed "NORMAL"; wp20 setWaypointBehaviour "AWARE"; rifle21 = [getmarkerpos "mk21", EAST, ["O_Soldier_AR_F","O_Soldier_AR_F","O_Soldier_GL_F" ,"O_Soldier_GL_F","O_Soldier_lite_F","O_Soldier_lite_F"],[],[],[],[],[],230] call BIS_fnc_spawnGroup; { _x assignAsCargo transport1 vehicle ((units transport1) select 0); } foreach units rifle21; or does the units have to spawn at same marker as transport? now they spawn at 21 and transport at 20, but its on top of each other Edited June 23, 2014 by xtesic Share this post Link to post Share on other sites
KC Grimes 79 Posted June 23, 2014 To provide an example for assignAsCargo and show how I personally go about managing spawning groups in vehicles in one of my missions, see below. [_boat1mkr, 180, "B_Boat_Armed_01_minigun_F", WEST] call bis_fnc_spawnVehicle; _boat1 = nearestObject [_boat1mkr, "SHIP"]; _boat1Driver = driver _boat1; _boat1Commander = commander _boat1; _boat1Gunner = gunner _boat1; [_boat1Commander, _boat1Gunner] join _boat1Driver; _boat1crew = group _boat1Driver; _boat1group = [_boat1crewmkr, WEST, ["B_Soldier_SL_F", "B_Soldier_F", "B_Soldier_F", "B_Soldier_F"]] call BIS_fnc_spawnGroup; {_x moveInCargo _boat1} forEach units _boat1group; {_x assignAsCargo _boat1} forEach units _boat1group; Note, assignAsCargo is not a replacement for moveInCargo, it is an additional requirement. Technically when using moveInCargo on an AI that unit does not "know" its location and won't act correctly. So, you must assign it via that command, and those similar to it. Share this post Link to post Share on other sites
Beerkan 71 Posted June 24, 2014 xtesic, I provided this solution in your original thread. Here is a working script. Create a group called "drivers". No units are assigned to this group yet. Spawn your "transport1" vehicle with an AI group named "drivers". Set the name "truck" as the vehicle name of "drivers" "O_Truck_02_transport_F" Now "rifle21" group will get into the "truck", and "drivers" will move to your waypoint. This works. if (!isServer) exitWith {}; drivers = creategroup EAST; transport1 = [(getMarkerPos "mk20"), 180, "O_Truck_02_transport_F", drivers] call BIS_fnc_spawnVehicle; truck = (transport1 select 0); rifle21 = [getmarkerpos "mk21", EAST, ["O_Soldier_AR_F","O_Soldier_AR_F","O_Soldier_GL_F" ,"O_Soldier_GL_F","O_Soldier_lite_F","O_Soldier_lite_F"],[],[],[],[],[],230] call BIS_fnc_spawnGroup; {_x assignAsCargo truck; _x moveinCargo truck; } foreach units rifle21; wp20 = drivers addWaypoint [(getmarkerpos "wp20"), 0]; wp20 setWaypointType "MOVE"; wp20 setWaypointSpeed "NORMAL"; wp20 setWaypointBehaviour "AWARE"; Share this post Link to post Share on other sites
xtesic 10 Posted June 24, 2014 THX BEERKAN!!! it works... at first it didnt spawn anything... looked it up on the forums, it seems, when there are more the 144 units of each side on the map, u cant spawn that script. tested it on a new mission: works like a charm!!!! great work beerkan, and all who helped only 1 thing is missing now... http://forums.bistudio.com/showthread.php?179476-help-needed-on-description-file Share this post Link to post Share on other sites