HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

A small problem with a trigger I have

09-06-2003, 03:36 PM#1
Abu
I'm currently having trouble with units that are created at an interval, added into a unit group, and sent to different regions according to that group. Everything works as it should except every once in a while some units get confused and return to the barracks and just sit there.

I've got this trigger set up to run like so:

***********************************************
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-If - Conditions
-(RBarracksSE is alive) Equal to True

-Then - Actions
-For each (Integer A) from 1 to 4, do (Actions)

-Loop - Actions
-Unit - Create 1 TribeMelee[TechLevel] for Player 1 (Red) at (Center of RBarracksSE <gen>) facing Default building facing degrees
-Unit Group - Add (Last created unit) to TribeOuterArmy
-Unit - Order (Last created unit) to Attack-Move To (Random point in SEJungle <gen>)
*End of Loop

-Unit - Create 1 TribeMage[TechLevel] for Player 1 (Red) at (Center of RBarracksSE <gen>) facing Default building facing degrees
-Unit Group - Add (Last created unit) to TribeOuterArmy
-Unit - Order (Last created unit) to Attack-Move To (Random point in SEJungle <gen>)
-Unit - Create 1 TribeRangers[TechLevel] for Player 1 (Red) at (Center of RBarracksSE <gen>) facing Default building facing degrees
-Unit Group - Add (Last created unit) to TribeOuterArmy
-Unit - Order (Last created unit) to Attack-Move To (Random point in SEJungle <gen>)
****************************************************

I have this trigger set up for 8 different barracks and the event is every 25 seconds of game time. Basically it checks to see whether each barracks is alive and if so it spawns 4 melee units, 1 mage, and 1 ranged unit at the barracks. It adds the units into an army because some units cross through the same regions they're sent to but I have different destinations. For example if a red unit from the outerarmy enters a region it goes north, a red unit from the innerarmy enters that region it goes east, and a blue unit goes south.

Since most people protect their maps I haven't really been able to look at how other people trigger these things but the terrain is more complex and requires more elaborate triggers. It's sort of a DOTA style map, but I won't go into details right now.

I'm not sure what causes these units to simply return back and lose their waypoints. I've seen other maps where you can select and tell units to go somewhere but they return right back to their destination. How can I trigger this? The only thing I could think of that is the problem is its not adding some units to the unit group but I don't know how to fix this. Any ideas?
09-06-2003, 06:40 PM#2
Bloodlust
unit groups have a maximum of 12 units... maybe that is a problem
09-06-2003, 07:37 PM#3
Pesmerga
. . . if he had more than 12 units, then they wouldnt have moved in the first place. Ive had this problem before, but it only occured when the grouped units were neutral passive. When I set them to player 1, they moved fine.
09-06-2003, 07:49 PM#4
Bloodlust
i had already several KI problems like that, some of them got fixed by making the spawn region smaller and other stupid stuff


hmmm do they use ACTIVE spells? like chain lightning or frostnova? if units have AUTOCAST (inner fire, curse, raise dead) spells they keep doing the attackmove. if they cast a non-autocats spell (dispel, unholy frenzy, ...) they run also back to starting pos if no enemies are nearby
if it is aos u do not always see it cuz the new enemies make them keep moving

if u want active spells give them "orbs" .. like a orb ob slow and remove the effect slow and add i.e. chain lightning with a 20% chance...
09-06-2003, 07:59 PM#5
Raptor--
Quote:
unit groups have a maximum of 12 units... maybe that is a problem

u do realize unit groups are not limited to 12 units

its only 'unit group - issue order X' that tries to act as an actual grouping as if selected by the player (ALA 12 units)
09-07-2003, 02:52 AM#6
Abu
Ah thanks for the responses. I've got it fixed and it wasn't unit groups or anything like that. Like was mentioned units sometimes return to their starting region, which for the outer barracks which the region separated two army types of the same team I didn't have it issue orders to entering units of the 2nd group type.

Thanks though :)