Nikki Mond Posted December 27, 2007 Share Posted December 27, 2007 I am using a Group X Attack Unit Y command. My question is once unit Y is dead what is the best way to follow up with another command for group X. Is there someway to check the status of a unit, using an IF loop lets say. And once its dead move onto another trigger. thanks Link to comment Share on other sites More sharing options...
BrassEm Posted December 27, 2007 Share Posted December 27, 2007 Sounds like you need to set a global variable for mission status count for group X. ie in Init... @@X-orders = 0 Main: Execute TEST trigger/routine... If y = dead then @@X-orders = 1 If z = nextmissionorder then @@X-orders = 2 etc... Then execute RESULT trigger/routine... If @@X-orders = 1 then X do this... If @@X-orders = 2 then X do this... Important to add delays in routines so game isnt bogged down. [ December 27, 2007, 03:22 AM: Message edited by: BrassEm ] Link to comment Share on other sites More sharing options...
Nikki Mond Posted December 28, 2007 Author Share Posted December 28, 2007 Thanks , sorta what I had in mind ,just had to see an example. The back half worked. That is Group X did move to point after unit Y was killed. Brings me to my next question. I can't seem to get a group to attack or storm a unit. I did have success storming and attacking rects but not units. It seems attack might be working, but the groups attacking keep a long distance, not aggressive. And storm does not work at all. So what is the difference between storm and attack? Link to comment Share on other sites More sharing options...
Sneaksie Posted December 28, 2007 Share Posted December 28, 2007 Probably a long shot, but do you specify UnitID in these commands? If your forces attack rects correctly but not units, maybe error is in UnitID. Link to comment Share on other sites More sharing options...
Gnasher Posted December 28, 2007 Share Posted December 28, 2007 Try using the createrectbyobject function on the unit to be attacked & then using a runcommand storm on the rect just created. It works a charm for me Link to comment Share on other sites More sharing options...
Nikki Mond Posted December 29, 2007 Author Share Posted December 29, 2007 Used 2 Createrectbyobject, for each of my tanks. Man the enemy makes a B line right for one then attacks the other. Works great. But there is a performance hit really slows till the tanks are gone. Im gonna see if I can clean it up. Thanks EDIT: Fixed I had the Createrectbyobject after a WorkArmy 2 statement. Tho the rect is created around an Army 1 tank. Thats all it was. Jerky slodown is gone [ December 29, 2007, 12:34 PM: Message edited by: Nikki Mond ] Link to comment Share on other sites More sharing options...
Recommended Posts