Jump to content
WurschtBanane

spawning an infantry squad when a trigger is acrivated.

Recommended Posts

Hey, i want to spawn an aa squad when i enter a trigger.

 

if (!isServer) exitWith {}; getMarkerPos = marker1; side = createCenter east; group2= createGroup east; group2= [spawnpos , east, (configFile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> "OIA_InfTeam_AA")] call BIS_fnc_spawnGroup; [group1,_spawnPos,200] call bis_fnc_taskpatrol;

 

ive got that in the trigger but it keeps telling me that there is a 

Reserved Variable in expression

so i cant put that into the triggers on act

Share this post


Link to post
Share on other sites


if (isServer) then {

    

    [] spawn {

        

        private _spawnPos = getMarkerPos "marker1";

        private _group2= [_spawnpos, east, (configFile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> "OIA_InfTeam_AA")] call BIS_fnc_spawnGroup;

        null = [_group2, _spawnPos, 200] call bis_fnc_taskpatrol;

    };

};

Share this post


Link to post
Share on other sites
if (isServer) then {
    
    [] spawn {
        
        private _spawnPos = getMarkerPos "marker1";
        private _group2= [_spawnpos, east, (configFile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> "OIA_InfTeam_AA")] call BIS_fnc_spawnGroup;
        null = [_group2, _spawnPos, 200] call bis_fnc_taskpatrol;
    };
};

That worked. Could you maybe tell me what i have to do so that a trigger gets activated when the group is killed? !alive group1 does not work.

Share this post


Link to post
Share on other sites

That worked. Could you maybe tell me what i have to do so that a trigger gets activated when the group is killed? !alive group1 does not work.

Although these forums are here for people to help each other, it's important that you search to see if an answer, to your question, exists before you post: HERE

Share this post


Link to post
Share on other sites

I agree but to make this easy as possible,

({alive _x} count (units group1)) isEqualTo 0

Share this post


Link to post
Share on other sites

Hey, i want to spawn an aa squad when i enter a trigger.

 

if (!isServer) exitWith {}; getMarkerPos = marker1; side = createCenter east; group2= createGroup east; group2= [spawnpos , east, (configFile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> "OIA_InfTeam_AA")] call BIS_fnc_spawnGroup; [group1,_spawnPos,200] call bis_fnc_taskpatrol;

 

ive got that in the trigger but it keeps telling me that there is a 

Reserved Variable in expression

so i cant put that into the triggers on act

"side" is a reserved variable, you can't assign it a value.

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

×