Jump to content
Sign in to follow this  
Freddan962

Need help to finish this script! :)

Recommended Posts

Hello, I'm stuck in a point where I don't know what to do to complete this.

This is my script:

if((rankId player >= 4) and (alive player)) then
{
hint format ["Group(s) spawned: %1", g_UnitSpawnedI];

for "g_UnitSpawnedI" from 1 to g_UnitSpawnedI do {
	_rUnit = ["O_soldier_SL_F","O_soldier_TL_F","O_soldier_AR_F", "O_soldier_GL_F", "O_soldier_LAT_F", "O_soldier_TL_F", "O_soldier_AR_F", "O_soldier_GL_F", "O_soldier_F", "O_medic_F"] call BIS_fnc_selectRandom;
	UnitGroupName = [getMarkerPos "Spawn_1", east, [_rUnit,[],[],[],[],[],180]] call BIS_fnc_spawnGroup;
	UnitGroupName addwaypoint[getMarkerPos "Bluefor", 0];
	[unitGroupName, 0] setwaypointCombatMode "RED";
	[unitGroupName, 0] setWaypointSpeed "FULL";

	hint format ["%1", _rUnit];
	g_UnitSpawnedI = g_UnitSpawnedI + 1;
};
} else {
hint "You don't have the permission.";
};

It says that it's expecting a group to set a waypoint. How would I get this running with all my newly spawned units?

Edited by Freddan962

Share this post


Link to post
Share on other sites

_GroupName = UnitGroupName select 2;//group

_GroupName addwaypoint[getMarkerPos "Bluefor", 0];

[_GroupName , 0] setwaypointCombatMode "RED";

[_GroupName , 0] setWaypointSpeed "FULL";

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  

×