prlugo Posted October 29, 2009 Share Posted October 29, 2009 I have a problem with a trigger in my new mission. I must command a group of 3 tankmen (all drivers) to enter in 3 different tanks. This is my trigger : label tankr label tankd Delay ( 2000 ) SetWorkArmy ( Army , 2 ) Set @Vill4 = GetNUnitsinArea ( ARMY , 2 , HUMAN , "Village4" , NO_PANIC ) Set @car = GetNUnitsinArea ( ARMY , 2 , HUMAN , "tanks" , NO_PANIC ) If ( @Vill4 < 4 ) Then ReinforcementLand ( Group , "TankDriver" ) delay ( 500 ) RunCommand ( Group , "TankDriver" , Move , RECT , "tanks" ) If ( @car > 0 ) Then delay ( 500 ) RunCommand ( GROUP , " TankDriver" , IN_CREW , UNIT , 139 ) RunCommand ( GROUP , " TankDriver" , IN_CREW , UNIT , 143 ) RunCommand ( GROUP , " TankDriver" , IN_CREW , UNIT , 147 ) else goto tankr endif else goto tankd endif Halt 3 drivers move to the rect but they don't enter in tanks. Tnx Link to comment Share on other sites More sharing options...
Arzok Posted October 29, 2009 Share Posted October 29, 2009 At least, as it is written, all drivers should go in the tank 147. You must ask each driver (specify his unit number) to go in his proper tank. replace also Set @car = GetNUnitsinArea ( ARMY , 2 , HUMAN , "tanks" , NO_PANIC ) by Set @car = GetNUnitsinArea ( group , "TankDriver" , HUMAN , "tanks" , NO_PANIC ) and last : If ( @Vill4 < 4 ) Then ReinforcementLand ( Group , "TankDriver" ) delay ( 500 ) RunCommand ( Group , "TankDriver" , Move , RECT , "tanks" ) endif Or the second condition will not work. Link to comment Share on other sites More sharing options...
prlugo Posted October 29, 2009 Author Share Posted October 29, 2009 Tnx Arzok. Now it works . Link to comment Share on other sites More sharing options...
Recommended Posts