Nikki Mond Posted December 7, 2007 Share Posted December 7, 2007 I might have the logic reversed. I want the mission won if all the enemy tanks left are destroyed, or the ones left have a destroyed gun. I don't want to chase damaged tanks. Will this work? </font><blockquote>code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">Label Kudos SetWorkArmy ( Army , 2 ) Set @USTanks = GetNUnits ( Army , 2 , Tanks , OK_Weapon , OK_Engine , Not_Empty , No_panic ) If ( @USTanks < 1 ) Then MissionWin ( Activate ) Halt Else Goto Kudos Endif Halt </pre> Link to comment Share on other sites More sharing options...
SlapHappy Posted December 7, 2007 Share Posted December 7, 2007 Nikki Here's a WinMission script directly from the "Last Chance" scenario which is similar to yours: </font><blockquote>code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">Delay ( 5000 ) SetWorkArmy ( Army , 2 ) Set @num_Ger_tanks = Getnunits ( Army , 2 , Tanks , OK_WEAPON , OK_ENGINE , NOT_EMPTY ) Set @num_Ger_Artill = Getnunits ( Army , 2 , ARTILLERY , OK_WEAPON , NOT_EMPTY ) Set @num_Ger_Inf_InArea = GetNUnitsInArea ( Army , 2 , HUMAN , "Rect_WIN" , NO_PANIC ) if ( @num_Ger_tanks = 0 "AND" @num_Ger_Artill = 0 "AND" @num_Ger_Inf_InArea = 0 ) Then QuestWin ( "Submission_2" ) Delay ( 100 ) QuestWin ( "Submission_3" ) Delay ( 100 ) QuestWin ( "Mission" ) MissionWinButton ( ACTIVATE ) ChangeFogOfWar ( "Disable" ) Delay ( 120000 ) MissionWin ( ) Halt ENDIF </pre> Link to comment Share on other sites More sharing options...
Recommended Posts