HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Loop an action

06-18-2009, 09:33 AM#1
Vervekke
Hi all

Can someone help me out how you loop an action.

If (((Attacked unit) is in OrcAssaultGroup) Equal to True) then do (Unit Group - Order OrcAssaultGroup to Attack (Attacking unit)) else do (Unit Group - Order OrcAssaultGroup to Attack (Random unit from (Units in Orc Attack BaseCamp <gen>)))

If I'm correct the action says

If a unit of OrcAssaultGroup is under attack then order OrcAssaultgroup to attack the attacking unit otherwise order OrcAssaultGroup to attack a random unit in the region.

So the problem is that I want them to continue there attack after they have destroyed the attacking unit. So my idea was to create a loop but I can't find out how to do it.

Can someone help me out.

Cheers
06-18-2009, 10:23 AM#2
Kino
As long as "Orc Assault Group" and the units in region are naturally hostile they should continue attacking by default.

Unless im missing something?