HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Crash bug...

09-08-2003, 09:20 PM#1
cideh
Unit Group - Pick every unit in (Units of type Town Hall) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) belongs to an ally of (Owner of (Last replaced unit))) Equal to False
(Distance between (Position of (Last replaced unit)) and (Position of (Picked unit))) Less than ClosestBaseDistance
Then - Actions
Set ClosestBase = (Picked unit)
Set ClosestBaseDistance = (Distance between (Position of (Picked unit)) and (Position of (Last replaced unit)))
Else - Actions
Do nothing
Unit - Set the custom value of (Last replaced unit) to (Player number of (Owner of ClosestBase))
Unit - Order (Picked unit) to Attack-Move To (Position of (Random unit from (Units owned by (Player((Custom value of (Picked unit)))) of type Town Hall)))
Set ClosestBase = No unit
Set ClosestBaseDistance = 999999.00


This trigger causes the game to crash. What's wrong in it?
09-08-2003, 09:24 PM#2
AllPainful
Quote:
Unit - Order (Picked unit) to Attack-Move To (Position of (Random unit from (Units owned by (Player((Custom value of (Picked unit)))) of type Town Hall)))


? Isn't the "Picked Unit" a town hall? (If I am reading your trigger right)... So how does a Town Hall attack-move?