Custom Map #505: Impact. By: Atrex

Started by AutoPost, April 27, 2014, 10:15:10 AM

Previous topic - Next topic

AutoPost

This topic is for discussion of map #505: Impact


Author: Atrex
Size: 162x162

Desc:
Face the creeper on a world bombarded by asteroids. The impacts kill creeper, but they also destroy your structures. (Note: The timer actually shows half the number it's supposed to. Sorry about that.)

Atrex

#1
The impact script:
# Impact.crpl
# Created on: 4/26/2014 9:10:05 PM
# ------------------------------------------

$minDelay:900
$maxDelay:1800
$CNAvoidRadius:50
#Only works with 1 CN
once
1 SetPopupTextAlwaysVisible
endonce
if(GetTimer0 0 eq)
CurrentCoords 10000 GetUnitsInRange
0 do
  ->unit
  <-unit GetUnitType "COMMANDNODE" eq if
<-unit CONST_COORDX GetUnitAttribute ->CNX <-unit CONST_COORDY GetUnitAttribute ->CNY
endif
loop
"MASS" RandCoords ->y ->x
while <-x <-y <-CNX <-CNY Distance <-CNAvoidRadius lt  Repeat
RandCoords ->y ->x
endwhile
<-x <-y FireAoo
<-minDelay <-maxDelay RandInt SetTimer0
endif
SetPopupText(GetTimer0 60 div)