Nikki Mond Posted December 9, 2007 Share Posted December 9, 2007 Not sure whats wrong here. Reinforcements dont show up when I kill off most my force. The scripting trigger seems OK, There are different examples. Some people just reactivate sleeping units for reinforcements. I cant figure this one out. 2 Days now. The problem might be in the mission tree or composition and not the scripting. Below the code is the editor tree, The army 1 is red but the reinforcements are yellow. </font><blockquote>code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">SetWorkArmy ( Army , 1 ) Label Begin Set @numGETroops = GetNUnits ( Army , 1 , HUMAN , No_Panic ) If ( @numGETroops = < 10 ) Then ReinforcementLand ( Group , "Group12" ) ReinforcementLand ( Group , "Group13" ) Delay ( 100 ) SendMessage ( "reserv" , 10000 , "Support_Receive" ) Else Goto Begin Delay ( 4000 ) ENDIF Halt </pre> Link to comment Share on other sites More sharing options...
Gnasher Posted December 9, 2007 Share Posted December 9, 2007 I assume that the triggers compile ok..... Try taking the else out. Add a halt before the endif & then put the goto before the 2nd halt. Also a short delay statement between the ReinforcementLand statements would'nt go amiss & might help. Something like this.... </font><blockquote>code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"> Label Begin SetWorkArmy ( Army , 1 ) Set @numGETroops = GetNUnits ( Army , 1 , HUMAN , No_Panic ) If ( @numGETroops = < 10 ) Then ReinforcementLand ( Group , "Group12" ) Delay ( 10 ) ReinforcementLand ( Group , "Group13" ) Delay ( 10 ) SendMessage ( "reserv" , 10000 , "Support_Receive" ) halt ENDIF Delay ( 60000 ) Goto Begin Halt </pre> Link to comment Share on other sites More sharing options...
Nikki Mond Posted December 10, 2007 Author Share Posted December 10, 2007 Thanks. Solved it by using sleeping units NOT sleeping reserve units. For some reason they wouldn't show. I'll use mongolian notation like my old C++ teach used to say That code does have a flaw the = < is wrong but was not the problem. Bottom line it works now. Reinforcements show up. Link to comment Share on other sites More sharing options...
Recommended Posts