Jump to content
Vyllis Fuhajins

Spawning a group then making it board a truck (resolved).

Recommended Posts

Hello i am newbie to scripting and arma3 editing and i can't find an answer to this:

I spawn a group of AI infantry and a truck (will be 2 IFVs when i get it to work) then set the waypoint so the AI infantry group board the truck.

 

I had no success yet. The AI infantry group move then stand still near the truck and do nothing. I would be glad if anyone can tell me what i am doing wrong.

 

This is the code for the truck:

 

 

VhcGroup = [getmarkerPos "SPA1", resistance,   ["I_Truck_02_covered_F"],[],[],[],[],[],0] call BIS_fnc_spawnGroup;

wp2 = VhcGroup addWaypoint [getMarkerPos "Load", 0];

wp2 setWaypointType "LOAD";
 

 

And this is the code for the infantry group:

 

 

RenfGroup = [getmarkerPos "SPA", resistance,   ["I_Soldier_SL_F","I_Soldier_M_F","I_Soldier_M_F","I_medic_F"],[],[],[],[],[],90] call BIS_fnc_spawnGroup;

wp1 = RenfGroup addWaypoint [getMarkerPos "Load", 10];

wp1 synchronizeWaypoint [wp2];

wp1 setWaypointType "GETIN";

 

Share this post


Link to post
Share on other sites

This video shows exactly what you want to do-handy little tutorial,if a bit out dated.

 

 

Share this post


Link to post
Share on other sites

Well, when i place the units in the editor, it does work very well. But i want to do this for units i spawn with a script so my mission wont overload the host computer.

And my spawned units with script does not board the truck :'(

Share this post


Link to post
Share on other sites

{_x moveincargo truck} foreach units RenfGroup;

Not pretty, gets the job done.

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

×