Knokke Posted March 23, 2010 Share Posted March 23, 2010 Is something wrong with the way I've written this trigger? SetWorkArmy ( ARMY , 2 ) ActionMode ( GROUP , "AB_Platcom_1" , SHORT_RUSH ) ActionMode ( GROUP , "AB_Inf_1" , SHORT_RUSH ) Delay (2000) SetGroupFormation ( "AB_Platcom_1" , LINETANKHUMAN ) SetGroupFormation ( "AB_Inf_1" , LINETANKHUMAN ) Delay ( 2000 ) RunCommand ( GROUP , "AB_Platcom_1" , STORM , RECT , "Regroup_1" ) RunCommand ( GROUP , "AB_Inf_1" , STORM , RECT , "Regroup_2" ) Delay ( 2000 ) LABEL regroup delay ( 5000 ) SET @num1 = GetNUnitsInArea ( GROUP , "AB_Platcom_1" , human , "Regroup_1" ) SET @num2 = GetNUnitsInArea ( GROUP , "AB_Inf_1" , human , "Regroup_2" ) IF ( @num1 < 7 and @num2 < 10 ) then GOTO regroup ENDIF Because as soon as the script is processing the GetNUnitsInArea command (every 5 seconds, if I'm not mistaken), the game pause for about one second). Group AB_Platcom_1 is a group made of 2 squads for a total of 15 soldiers, and AB_Inf1 a group of 2 infantry squad for a total of 20 members only, so I'm surprised that it could be so heavy to process. I've a grand total of 130 units on the map (all infantry except 2 HMG and 2 trucks). This exact same mission (with the same trigger) was running very well in ToW2 Africa (with a total of about 125 units, one of the trucks being replaced by a HMG) Link to comment Share on other sites More sharing options...
Arzok Posted March 23, 2010 Share Posted March 23, 2010 No idea ! But SetGroupFormation ( "AB_Inf_1" , LINETANKHUMAN ) works with point, not with rect (I think) RunCommand ( GROUP , "AB_Inf_1" , STORM , RECT , "Regroup_2" ) Link to comment Share on other sites More sharing options...
Knokke Posted March 23, 2010 Author Share Posted March 23, 2010 Thanks a lot Arzok for pointing me in the right direction. There really was a problem with LINETANKHUMAN and the RECT (I checked the documentation, and it is not working with areas, and it is said about the RunCommand "If a group of units moves to the script area RECT, no formation is used since a random point is selected within the area". So the SetGroupFormation command was useless, but made the computer struggle with the framerates. I also checked the trigger in my previous mission in ToW2 Africa, and not surprisingly, the SetGroupFormation ( "AB_Inf_1" , LINETANKHUMAN ) was not there. Link to comment Share on other sites More sharing options...
Recommended Posts