function Initialize() cGenObj2(0, -0.8, "Enemy1") t = 0 end function main() if (t < 100) then if (math.mod(t,10) == 0) then cGenObj2(math.random(0,100) * 0.002, -0.8, "Enemy1") end end if ((t >= 150) and (t < 250)) then if (math.mod(t,10) == 0) then cGenObj2(math.random(0,100) * 0.002, -0.8, "Enemy2") end end t = t + 1 end function Enemy1(e) cSetX(e, cGetX(e) + 0.001) cSetY(e, cGetY(e) + cGetLocalTime(e) * 0.0005) end function Enemy2(e) cSetX(e, cGetX(e) - 0.001) cSetY(e, cGetY(e) + cGetLocalTime(e) * 0.0005) end