HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Spawn Unit Trigger not working

02-04-2006, 04:33 PM#1
Orc Dork
I am trying to make a trigger for my map and what I came up with was:
Trigger:
footman spawn
Collapse Events
Time - Every 2.00 seconds of game time
Collapse Conditions
Collapse And - All (Conditions) are true
Collapse Conditions
(Footman Summon Square <gen> contains (Triggering unit)) Equal to True
(Unit-type of (Triggering unit)) Equal to Peasant
Collapse Actions
Unit - Create 1 Footman for Player 1 (Red) at (Center of Unit Spawn RegionRED <gen>) facing Default building facing degrees


After I talked to JohnFN, we came up with this:
Trigger:
Collapse Untitled Trigger 001

Collapse Events
Time - Every 2.00 seconds of game time
Conditions
Collapse Actions
Collapse Unit Group - Pick every unit in (Your Reigon) and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Collapse And - All (Conditions) are true
Collapse Conditions
(Footman Summon Square <gen> contains (Picked Unit)) Equal to True
Collapse (Unit-type of (Picked Unit)) Equal to Peasant
Then - Actions
Collapse Unit - Create 1 Footman for Player 1 (Red) at (Center of Unit Spawn RegionRED <gen>) facing Default building facing degrees
Else - Actions

And it seems to work, if anyone has any other suggestions feel free to post.
02-04-2006, 04:42 PM#2
johnfn
The title of the thread is misleading, as far as I know the trigger should work 100% fine, just remember to clean it up with a

Trigger:
Custom script: call DestroyGroup( udg_TempGroup )


so your unitgroup leak doesn't start lagging.