Webwing Posted January 4, 2008 Share Posted January 4, 2008 Can someone help me with this please. RunCommand ( GROUP , "Group_Ger_09" , STORM , RECT , "Attack4" ) Now, Attack4 is not a rect but an array of rects. How does the AI goes about this? I see that the designer did a grid of rects, 16 of them. It's not really in a sequence. 13 is in the far right and the next, 12, is in the far left.(see picture) - - I'd like to use more advanced techniques in my missions but I still can't figure this array of rects. The arrays of points is fine. Just like waypoints. Thanks -- Link to comment Share on other sites More sharing options...
SlapHappy Posted January 4, 2008 Share Posted January 4, 2008 What happens when the trigger is launched in-mission. I remember reading somewhere that the attack rect command causes the attacking unit to randomly attack some POINT inside the rect declared area...... Link to comment Share on other sites More sharing options...
Webwing Posted January 4, 2008 Author Share Posted January 4, 2008 Originally posted by SlapHappy: What happens when the trigger is launched in-mission. I remember reading somewhere that the attack rect command causes the attacking unit to randomly attack some POINT inside the rect declared area...... I use the attack rect. The attacking forces attack the enemy troops inside that rect. No problem there. When you use an array of points there is usually a trigger to control the points so that they work as way points for the units to follow. You can control how long they stay in each point etc. I have no problem using those. Now for the array of rects there is no control script that I could find. That's what is intriguing me. This is the first mission of the USSR campaign. -- Link to comment Share on other sites More sharing options...
Webwing Posted January 5, 2008 Author Share Posted January 5, 2008 I have found a control script for the rects: </font><blockquote>code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"> // ------------------------------------------ ForEach LABEL ChecktArray Delay ( 100 , 200 ) SET @rectStorm = ArrayGetElementName ( @arrayRects , @nIndex ) SetWorkArmy ( ARMY , @idPlayerArmy ) SET @nPlayerTanks = GetNUnitsInArea ( ARMY , @idPlayerArmy , HUMAN , @rectStorm , CREW ) IF ( @nPlayerTanks > 0 ) THEN GOTO OnFindPlayer ENDIF ADD ( @nIndex , 1 ) IF ( @nIndex < @nLen ) THEN GOTO ChecktArray EndIF</pre> Link to comment Share on other sites More sharing options...
Nikki Mond Posted January 6, 2008 Share Posted January 6, 2008 The quick mission generator that was mentioned in other threads is likely going to have a generic algorithm that resembles that very example. Link to comment Share on other sites More sharing options...
SlapHappy Posted January 6, 2008 Share Posted January 6, 2008 Webwing I took a look at Rovno myself and all the attack scripts I saw look something like this: </font><blockquote>code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">SetWorkArmy ( ARMY , 1 ) CreateRectByObject ( RECT , "Attack3" , 100 , ARMY , 1 , TANKS , 2 , NOT_EMPTY ) Delay ( 500 ) SetWorkArmy ( ARMY , 2 ) RunCommand ( GROUP , "Group_Ger_08" , STORM , RECT , "Attack3" ) </pre> Link to comment Share on other sites More sharing options...
Recommended Posts