HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need help badly =(

07-30-2003, 08:27 AM#1
blubber
I have this problem when picking units within a region centered at a point. When i run this trigger, it only seems to pick a few units or sometimes none at all. Anyone know reason why or how to solve this problem? Here is the trigger by the way:

Corpse Explosion Trigger
Events
Unit - A unit owned by Player 1 (Red) Is issued an order with no target
Conditions
(Issued order) Equal to (Order(animatedead))
Actions
Wait 0.10 game-time seconds
Game - Display to (All players) the text: copsy begin
Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is Summoned) Equal to True) and (((Matching unit) is Undead) Equal to True))) and do (Actions)
Loop - Actions
Set UnitTypeCorpseExplosion = (Unit-type of (Picked unit))
Set UnitCorpseExplosion = (Picked unit)
Set PointCorpseExplosion = (Position of (Picked unit))
Unit - Explode (Picked unit)
Game - Display to (All players) the text: (point: + (String((X of PointCorpseExplosion))))
Game - Display to (All players) the text: (point: + (String((Y of PointCorpseExplosion))))
Game - Display to (All players) the text: (corpsy health: + (String((Max life of (Picked unit)))))
Game - Display to (All players) the text: (summoned corpsy health: + (String((Max life of (Summoned unit)))))
Game - Display to (All players) the text: copsy explode
Unit Group - Pick every unit in (Units in (Region centered at PointCorpseExplosion with size ((192.00 x (((Real(IntSpellLevelCorpseExplosion)) + 1.00) x 0.83)), (192.00 x (((Real(IntSpellLevelCorpseExplosion)) + 1.00) x 0.83)))) matching ((((Matching unit) belongs to an ally of (Owner of (O and do (Actions)
Loop - Actions
Game - Display to (All players) the text: (String((Life of (Picked unit))))
Set IntRandomMultiplier = (Random real number between 0.25 and 0.75)
Set UnitEnemyUnit = (Picked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Life of UnitEnemyUnit) - (IntRandomMultiplier x (Max life of UnitCorpseExplosion))) Less than or equal to 1.00
Then - Actions
Trigger - Run Give Experience <gen> (ignoring conditions)
Else - Actions
Do nothing
Game - Display to (All players) the text: (String((Life of UnitEnemyUnit)))
Sound - Play SoundCorpseExplosion
Unit - Set life of UnitEnemyUnit to ((Life of UnitEnemyUnit) - (IntRandomMultiplier x (Max life of UnitCorpseExplosion)))
Game - Display to (All players) the text: (String((Life of UnitEnemyUnit)))
Game - Display to (All players) the text: copsy damage
Game - Display to (All players) the text: copsy end
07-30-2003, 04:15 PM#2
Dark Azonik
Pick every unit in region means that it will form a unit group which the maximum is 12 so if you have like 30 units in a region it will only pick 12
07-31-2003, 10:00 AM#3
blubber
Ok that clears a few things but why does it sometimes pick no units within the region when there are a lot?
08-01-2003, 01:01 PM#4
blubber
(bump)