Jump to content
Sign in to follow this  
frogtop123

Help with Assigning new placed units to zeus

Recommended Posts

Hi guys, I have been trying to make a script to spawn a group of units at a said location and have them assigned to the zeus which is the player. I am not getting any visible error messages when i run the script but i am not able to edit the objects as zeus after they spawn. Here is the script i have written, everythings working but for the problem mentioned above. 


if (supplyPoints >= 20) then
{
hint "You deployed an Infantry Section";
group_1 = createGroup west;
unitTypes = [
    "Athena_B_G_Soldier_SL_F", 
    "Athena_B_G_RadioOperator_F", 
    "Athena_B_G_Medic_F", 
    "Athena_B_G_Soldier_AR_F", 
    "Athena_B_G_Soldier_TL_F", 
    "Athena_B_G_Soldier_LAT_F", 
    "Athena_B_G_soldier_M_F"
];

{
    _unit = group_1 createUnit [_x, getMarkerPos "infbarracks", [], 0, "NONE"];
} forEach unitTypes;
editmodule_1 addCuratorEditableObjects ["group_1", true];
supplyPoints = supplyPoints - 20;
sleep 3;
hintSilent format ["Supply Points: %1", supplyPoints];
}
else {hint "You do not have enough supply points!";}

and this is my init.sqf

supplyPoints = 100;

I dont have any other files 

 

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
Sign in to follow this  

×