Jump to content
Sign in to follow this  
UltimateBawb

Unworking 'While' Statement

Recommended Posts

Trying to make a loop that's called by the server which spawns groups at certain areas and tells them to move somewhere every 60 seconds. Calling the script works, but anything inside the 'while' statement is ignored. Any suggestions?

hint "Call Works";

while {true} do {

hint "While Works";

if (a == 1)
{
	indAttackGroup = createGroup resistance;
	_indAttacker = indAttackGroup createUnit ["TK_GUE_Soldier_5_EP1", getMarkerPos "DeryaNPCSpawn", [], 1, "NONE"];
	removeAllWeapons _indAttacker;
	_indAttacker addWeapon "RH_t56";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addWeapon "RH_m1911old";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";

	_indAttacker = indAttackGroup createUnit ["TK_GUE_Soldier_5_EP1", getMarkerPos "DeryaNPCSpawn", [], 1, "NONE"];
	removeAllWeapons _indAttacker;
	_indAttacker addWeapon "RH_t561";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addWeapon "RPG7V";
	_indAttacker addMagazine "PG7V";
	_indAttacker addMagazine "PG7V";
	_indAttacker addMagazine "PG7V";
	_indAttacker addWeapon "RH_m1911old";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";

	_indAttacker = indAttackGroup createUnit ["TK_GUE_Soldier_Sniper_EP1", getMarkerPos "DeryaNPCSpawn", [], 1, "NONE"];
	removeAllWeapons _indAttacker;
	_indAttacker addWeapon "huntingrifle";
	_indAttacker addMagazine "5x_22_LR_17_HMR";
	_indAttacker addMagazine "5x_22_LR_17_HMR";
	_indAttacker addMagazine "5x_22_LR_17_HMR";
	_indAttacker addMagazine "5x_22_LR_17_HMR";
	_indAttacker addMagazine "5x_22_LR_17_HMR";
	_indAttacker addWeapon "RH_m1911old";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";

	_indAttacker = indAttackGroup createUnit ["TK_GUE_Bonesetter_EP1", getMarkerPos "DeryaNPCSpawn", [], 1, "NONE"];
	removeAllWeapons _indAttacker;
	_indAttacker addWeapon "LeeEnfield";
	_indAttacker addMagazine "10x_303";
	_indAttacker addMagazine "10x_303";
	_indAttacker addMagazine "10x_303";
	_indAttacker addMagazine "10x_303";
	_indAttacker addMagazine "10x_303";
	_indAttacker addMagazine "10x_303";
	_indAttacker addMagazine "10x_303";
	_indAttacker addWeapon "RH_m1911old";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	indAttackGroup addWaypoint [getMarkerPos "DeryaNPCAttack", 20];

	sleep 60;
};

if (b == 1)
{
	indAttackGroup2 = createGroup resistance;
	_indAttacker = indAttackGroup2 createUnit ["TK_GUE_Soldier_5_EP1", getMarkerPos "DeryaNPCSpawn", [], 1, "NONE"];
	removeAllWeapons _indAttacker;
	_indAttacker addWeapon "RH_t56";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addWeapon "RH_m1911old";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";

	_indAttacker = indAttackGroup2 createUnit ["TK_GUE_Soldier_5_EP1", getMarkerPos "DeryaNPCSpawn", [], 1, "NONE"];
	removeAllWeapons _indAttacker;
	_indAttacker addWeapon "RH_t561";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addWeapon "RPG7V";
	_indAttacker addMagazine "PG7V";
	_indAttacker addMagazine "PG7V";
	_indAttacker addMagazine "PG7V";
	_indAttacker addWeapon "RH_m1911old";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";

	_indAttacker = indAttackGroup2 createUnit ["TK_GUE_Soldier_Sniper_EP1", getMarkerPos "DeryaNPCSpawn", [], 1, "NONE"];
	removeAllWeapons _indAttacker;
	_indAttacker addWeapon "huntingrifle";
	_indAttacker addMagazine "5x_22_LR_17_HMR";
	_indAttacker addMagazine "5x_22_LR_17_HMR";
	_indAttacker addMagazine "5x_22_LR_17_HMR";
	_indAttacker addMagazine "5x_22_LR_17_HMR";
	_indAttacker addMagazine "5x_22_LR_17_HMR";
	_indAttacker addWeapon "RH_m1911old";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";

	_indAttacker = indAttackGroup2 createUnit ["TK_GUE_Bonesetter_EP1", getMarkerPos "DeryaNPCSpawn", [], 1, "NONE"];
	removeAllWeapons _indAttacker;
	_indAttacker addWeapon "LeeEnfield";
	_indAttacker addMagazine "10x_303";
	_indAttacker addMagazine "10x_303";
	_indAttacker addMagazine "10x_303";
	_indAttacker addMagazine "10x_303";
	_indAttacker addMagazine "10x_303";
	_indAttacker addMagazine "10x_303";
	_indAttacker addMagazine "10x_303";
	_indAttacker addWeapon "RH_m1911old";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	indAttackGroup2 addWaypoint [getMarkerPos "DeryaNPCAttack2", 20];

	sleep 60;
};

if (c == 1)
{
	TKAttackGroup = createGroup east;
	_TKAttacker = TKAttackGroup createUnit ["TK_Soldier_AAT_EP1", getMarkerPos "TKNPCSpawn", [], 1, "NONE"];
	removeAllWeapons _TKAttacker;
	_TKAttacker addWeapon "FN_FAL";
	_TKAttacker addMagazine "20Rnd_762x51_FNFAL";
	_TKAttacker addMagazine "20Rnd_762x51_FNFAL";
	_TKAttacker addMagazine "20Rnd_762x51_FNFAL";
	_TKAttacker addMagazine "20Rnd_762x51_FNFAL";
	_TKAttacker addMagazine "20Rnd_762x51_FNFAL";
	_TKAttacker addMagazine "20Rnd_762x51_FNFAL";
	_TKAttacker addMagazine "20Rnd_762x51_FNFAL";
	_TKAttacker addMagazine "20Rnd_762x51_FNFAL";
	_TKAttacker addWeapon "RH_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";

	_TKAttacker = TKAttackGroup createUnit ["TK_Soldier_AT_EP1", getMarkerPos "TKNPCSpawn", [], 1, "NONE"];
	removeAllWeapons _TKAttacker;
	_TKAttacker addWeapon "RH_akm";
	_TKAttacker addMagazine "30Rnd_762x39_AK47";
	_TKAttacker addMagazine "30Rnd_762x39_AK47";
	_TKAttacker addMagazine "30Rnd_762x39_AK47";
	_TKAttacker addMagazine "30Rnd_762x39_AK47";
	_TKAAttacker addWeapon "RPG7V";
	_TKAAttacker addMagazine "PG7V";
	_TKAAttacker addMagazine "PG7V";
	_TKAAttacker addMagazine "OG7";
	_TKAttacker addWeapon "RH_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";

	_TKAttacker = TKAttackGroup createUnit ["TK_Soldier_Medic_EP1", getMarkerPos "TKNPCSpawn", [], 1, "NONE"];
	removeAllWeapons _TKAttacker;
	_TKAttacker addWeapon "RH_ak74";
	_TKAttacker addMagazine "30Rnd_545x39_AK";
	_TKAttacker addMagazine "30Rnd_545x39_AK";
	_TKAttacker addMagazine "30Rnd_545x39_AK";
	_TKAttacker addMagazine "30Rnd_545x39_AK";
	_TKAttacker addMagazine "30Rnd_545x39_AK";
	_TKAttacker addMagazine "30Rnd_545x39_AK";
	_TKAttacker addMagazine "30Rnd_545x39_AK";
	_TKAttacker addMagazine "30Rnd_545x39_AK";
	_TKAttacker addMagazine "30Rnd_545x39_AK";
	_TKAttacker addMagazine "30Rnd_545x39_AK";
	_TKAttacker addWeapon "RH_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";

	_TKAttacker = TKAttackGroup createUnit ["TK_Soldier_MG_EP1", getMarkerPos "TKNPCSpawn", [], 1, "NONE"];
	removeAllWeapons _TKAttacker;
	_TKAttacker addWeapon "RH_rpk74";
	_TKAttacker addMagazine "RH_45Rnd_545x39_mag";
	_TKAttacker addMagazine "RH_45Rnd_545x39_mag";
	_TKAttacker addMagazine "RH_45Rnd_545x39_mag";
	_TKAttacker addMagazine "RH_45Rnd_545x39_mag";
	_TKAttacker addMagazine "RH_45Rnd_545x39_mag";
	_TKAttacker addMagazine "30Rnd_762x39_AK47";
	_TKAttacker addMagazine "30Rnd_762x39_AK47";
	_TKAttacker addWeapon "RH_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	TKAttackGroup addWaypoint [getMarkerPos "TKNPCAttack", 20];

	sleep 60;
};
};

Edited by UltimateBawb

Share this post


Link to post
Share on other sites

if (condition) [b]then[/b] {statement};

Wasn't browsing through the whole script, just pointing what catched my attention.

Share this post


Link to post
Share on other sites

I've tried to change the if statements to that before, but the hint is completely independent of the ifs, no?

Share this post


Link to post
Share on other sites

I've had this issue before with hints not working at in a while loop, I have no idea why. I eventually got it working by adding a sleep command to the while command and the hints started working again. In your code you have the sleep in one of the if statements and not in the while loop.

Here is the fixed code:

hint "Call Works";

while {true} do {

hint "While Works";

if (a == 1) then {
	indAttackGroup = createGroup resistance;
	_indAttacker = indAttackGroup createUnit ["TK_GUE_Soldier_5_EP1", getMarkerPos "DeryaNPCSpawn", [], 1, "NONE"];
	removeAllWeapons _indAttacker;
	_indAttacker addWeapon "RH_t56";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addWeapon "RH_m1911old";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";

	_indAttacker = indAttackGroup createUnit ["TK_GUE_Soldier_5_EP1", getMarkerPos "DeryaNPCSpawn", [], 1, "NONE"];
	removeAllWeapons _indAttacker;
	_indAttacker addWeapon "RH_t561";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addWeapon "RPG7V";
	_indAttacker addMagazine "PG7V";
	_indAttacker addMagazine "PG7V";
	_indAttacker addMagazine "PG7V";
	_indAttacker addWeapon "RH_m1911old";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";

	_indAttacker = indAttackGroup createUnit ["TK_GUE_Soldier_Sniper_EP1", getMarkerPos "DeryaNPCSpawn", [], 1, "NONE"];
	removeAllWeapons _indAttacker;
	_indAttacker addWeapon "huntingrifle";
	_indAttacker addMagazine "5x_22_LR_17_HMR";
	_indAttacker addMagazine "5x_22_LR_17_HMR";
	_indAttacker addMagazine "5x_22_LR_17_HMR";
	_indAttacker addMagazine "5x_22_LR_17_HMR";
	_indAttacker addMagazine "5x_22_LR_17_HMR";
	_indAttacker addWeapon "RH_m1911old";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";

	_indAttacker = indAttackGroup createUnit ["TK_GUE_Bonesetter_EP1", getMarkerPos "DeryaNPCSpawn", [], 1, "NONE"];
	removeAllWeapons _indAttacker;
	_indAttacker addWeapon "LeeEnfield";
	_indAttacker addMagazine "10x_303";
	_indAttacker addMagazine "10x_303";
	_indAttacker addMagazine "10x_303";
	_indAttacker addMagazine "10x_303";
	_indAttacker addMagazine "10x_303";
	_indAttacker addMagazine "10x_303";
	_indAttacker addMagazine "10x_303";
	_indAttacker addWeapon "RH_m1911old";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	indAttackGroup addWaypoint [getMarkerPos "DeryaNPCAttack", 20];
};
        if (b == 1) then {
	indAttackGroup2 = createGroup resistance;
	_indAttacker = indAttackGroup2 createUnit ["TK_GUE_Soldier_5_EP1", getMarkerPos "DeryaNPCSpawn", [], 1, "NONE"];
	removeAllWeapons _indAttacker;
	_indAttacker addWeapon "RH_t56";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addWeapon "RH_m1911old";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";

	_indAttacker = indAttackGroup2 createUnit ["TK_GUE_Soldier_5_EP1", getMarkerPos "DeryaNPCSpawn", [], 1, "NONE"];
	removeAllWeapons _indAttacker;
	_indAttacker addWeapon "RH_t561";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addMagazine "30Rnd_762x39_AK47";
	_indAttacker addWeapon "RPG7V";
	_indAttacker addMagazine "PG7V";
	_indAttacker addMagazine "PG7V";
	_indAttacker addMagazine "PG7V";
	_indAttacker addWeapon "RH_m1911old";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";

	_indAttacker = indAttackGroup2 createUnit ["TK_GUE_Soldier_Sniper_EP1", getMarkerPos "DeryaNPCSpawn", [], 1, "NONE"];
	removeAllWeapons _indAttacker;
	_indAttacker addWeapon "huntingrifle";
	_indAttacker addMagazine "5x_22_LR_17_HMR";
	_indAttacker addMagazine "5x_22_LR_17_HMR";
	_indAttacker addMagazine "5x_22_LR_17_HMR";
	_indAttacker addMagazine "5x_22_LR_17_HMR";
	_indAttacker addMagazine "5x_22_LR_17_HMR";
	_indAttacker addWeapon "RH_m1911old";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";

	_indAttacker = indAttackGroup2 createUnit ["TK_GUE_Bonesetter_EP1", getMarkerPos "DeryaNPCSpawn", [], 1, "NONE"];
	removeAllWeapons _indAttacker;
	_indAttacker addWeapon "LeeEnfield";
	_indAttacker addMagazine "10x_303";
	_indAttacker addMagazine "10x_303";
	_indAttacker addMagazine "10x_303";
	_indAttacker addMagazine "10x_303";
	_indAttacker addMagazine "10x_303";
	_indAttacker addMagazine "10x_303";
	_indAttacker addMagazine "10x_303";
	_indAttacker addWeapon "RH_m1911old";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	_indAttacker addMagazine "7Rnd_45ACP_1911";
	indAttackGroup2 addWaypoint [getMarkerPos "DeryaNPCAttack2", 20];
};
       if (c == 1) then {
	TKAttackGroup = createGroup east;
	_TKAttacker = TKAttackGroup createUnit ["TK_Soldier_AAT_EP1", getMarkerPos "TKNPCSpawn", [], 1, "NONE"];
	removeAllWeapons _TKAttacker;
	_TKAttacker addWeapon "FN_FAL";
	_TKAttacker addMagazine "20Rnd_762x51_FNFAL";
	_TKAttacker addMagazine "20Rnd_762x51_FNFAL";
	_TKAttacker addMagazine "20Rnd_762x51_FNFAL";
	_TKAttacker addMagazine "20Rnd_762x51_FNFAL";
	_TKAttacker addMagazine "20Rnd_762x51_FNFAL";
	_TKAttacker addMagazine "20Rnd_762x51_FNFAL";
	_TKAttacker addMagazine "20Rnd_762x51_FNFAL";
	_TKAttacker addMagazine "20Rnd_762x51_FNFAL";
	_TKAttacker addWeapon "RH_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";

	_TKAttacker = TKAttackGroup createUnit ["TK_Soldier_AT_EP1", getMarkerPos "TKNPCSpawn", [], 1, "NONE"];
	removeAllWeapons _TKAttacker;
	_TKAttacker addWeapon "RH_akm";
	_TKAttacker addMagazine "30Rnd_762x39_AK47";
	_TKAttacker addMagazine "30Rnd_762x39_AK47";
	_TKAttacker addMagazine "30Rnd_762x39_AK47";
	_TKAttacker addMagazine "30Rnd_762x39_AK47";
	_TKAAttacker addWeapon "RPG7V";
	_TKAAttacker addMagazine "PG7V";
	_TKAAttacker addMagazine "PG7V";
	_TKAAttacker addMagazine "OG7";
	_TKAttacker addWeapon "RH_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";

	_TKAttacker = TKAttackGroup createUnit ["TK_Soldier_Medic_EP1", getMarkerPos "TKNPCSpawn", [], 1, "NONE"];
	removeAllWeapons _TKAttacker;
	_TKAttacker addWeapon "RH_ak74";
	_TKAttacker addMagazine "30Rnd_545x39_AK";
	_TKAttacker addMagazine "30Rnd_545x39_AK";
	_TKAttacker addMagazine "30Rnd_545x39_AK";
	_TKAttacker addMagazine "30Rnd_545x39_AK";
	_TKAttacker addMagazine "30Rnd_545x39_AK";
	_TKAttacker addMagazine "30Rnd_545x39_AK";
	_TKAttacker addMagazine "30Rnd_545x39_AK";
	_TKAttacker addMagazine "30Rnd_545x39_AK";
	_TKAttacker addMagazine "30Rnd_545x39_AK";
	_TKAttacker addMagazine "30Rnd_545x39_AK";
	_TKAttacker addWeapon "RH_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";

	_TKAttacker = TKAttackGroup createUnit ["TK_Soldier_MG_EP1", getMarkerPos "TKNPCSpawn", [], 1, "NONE"];
	removeAllWeapons _TKAttacker;
	_TKAttacker addWeapon "RH_rpk74";
	_TKAttacker addMagazine "RH_45Rnd_545x39_mag";
	_TKAttacker addMagazine "RH_45Rnd_545x39_mag";
	_TKAttacker addMagazine "RH_45Rnd_545x39_mag";
	_TKAttacker addMagazine "RH_45Rnd_545x39_mag";
	_TKAttacker addMagazine "RH_45Rnd_545x39_mag";
	_TKAttacker addMagazine "30Rnd_762x39_AK47";
	_TKAttacker addMagazine "30Rnd_762x39_AK47";
	_TKAttacker addWeapon "RH_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	_TKAttacker addMagazine "RH_8Rnd_762_tt33";
	TKAttackGroup addWaypoint [getMarkerPos "TKNPCAttack", 20];
};
       sleep 60;
};

Share this post


Link to post
Share on other sites

Hint in non sleeping while loops used to work last I (accidentally) did it. It would cause a an extremely horrible (hint) sound due getting played maybe hundreds of times on top of each other. If that is a problem now, they've either applied a weird fix for this, or the hardware is bonking down. Basically, hint in non sleeping loops is not something you want to do :) Better with hintSilent.

Share this post


Link to post
Share on other sites

Argh. For some reason adding in 'thens' in the if statements fixed it this time, don't know why it didn't work before. I've been writing too much Java. >_>

Thanks for the help!

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  

×