Array
(
[scriptVersion] => 7
[oeValues] => Array
(
[Art] => ReplaceableTextures\CommandButtons\BTNFlyingMachine.blp
[dmgplus1] => 774
[bldtm] => 1
[goldcost] => 4500
[sides1] => 1
[Missilearc] => 0.5
[acquire] => 1750
[upgrades] => Array
(
)
[Upgrade] => Array
(
)
[Name] => Helicopter Zone
[weapTp1] => missile
[MissileHoming] => 1
[Missileart] => none.mdl
[Missilespeed] => 1000
[dice1] => 1
[RngBuff1] => 250
[modelScale] => 0.8
[rangeN1] => 1000
[atkType1] => siege
[cool1] => 0.25
[Ubertip] => Attacks with highly impractical aircraft.
[abilList] => Array
(
)
[customTeamColor] => 1
[buildingShadow] => Array
(
)
[targs1] => Array
(
)
[weapsOn] => 1
[teamColor] => 1
)
[settings] => Array
(
[balanceTip] => Array
(
)
[abil_factor] => 0.8799
[author] => Deemzul
[alpha] => 0
[authorDisplay] => Deemzul
[version] => 0.0
[element] => iron
[rarity] => unique
)
[effects] => Array
(
[0] => Array
(
[x] => -18.3845
[y] => -2.6295
[z] => 96
[scale] => 0.3375
[rot] => 0
[file] => Doodads\Cityscape\Structures\CityLowWall90\CityLowWall90.mdl
[red] => 255
[green] => 255
[blue] => 255
[alpha] => 255
[pitch] => 0
[advanced] => true
[animation] => Array
(
)
[aniSpeed] => 50
)
[1] => Array
(
[x] => 13.9069
[y] => -3.82394
[z] => 96
[scale] => 0.3375
[rot] => 0
[file] => Doodads\Cityscape\Structures\CityLowWall90\CityLowWall90.mdl
[red] => 255
[green] => 255
[blue] => 255
[alpha] => 255
[pitch] => 0
[advanced] => true
[animation] => Array
(
)
[aniSpeed] => 50
)
[2] => Array
(
[x] => -1.35077
[y] => 0.278308
[z] => 102.4
[scale] => 0.225
[rot] => 1.5708
[file] => Doodads\Cityscape\Structures\CityLowWall90\CityLowWall90.mdl
[red] => 255
[green] => 255
[blue] => 255
[alpha] => 255
[pitch] => 0
[advanced] => true
[animation] => Array
(
)
[aniSpeed] => 50
)
[3] => Array
(
[x] => 26.3975
[y] => -35.5273
[z] => 0
[scale] => 0.3
[rot] => 2.34311
[file] => doodads\underground\terrain\SupportBeam\SupportBeam.mdl
[red] => 255
[green] => 255
[blue] => 255
[alpha] => 255
[pitch] => 0
[advanced] => true
[animation] => Array
(
)
[aniSpeed] => 50
)
[4] => Array
(
[x] => -31.4669
[y] => -36.2748
[z] => 0
[scale] => 0.3
[rot] => 0.724835
[file] => doodads\underground\terrain\SupportBeam\SupportBeam.mdl
[red] => 255
[green] => 255
[blue] => 255
[alpha] => 255
[pitch] => 0
[advanced] => true
[animation] => Array
(
)
[aniSpeed] => 50
)
[5] => Array
(
[x] => -3.26558
[y] => -45.7122
[z] => 0
[scale] => 0.2775
[rot] => 1.5708
[file] => doodads\underground\terrain\SupportBeam\SupportBeam.mdl
[red] => 255
[green] => 255
[blue] => 255
[alpha] => 255
[pitch] => 0
[advanced] => true
[animation] => Array
(
)
[aniSpeed] => 50
)
[6] => Array
(
[x] => -3.32683
[y] => 1.63196
[z] => 25.6
[scale] => 1.75
[rot] => 3.14784
[file] => Buildings\Other\BarrelsUnit0\BarrelsUnit0.mdl
[red] => 255
[green] => 255
[blue] => 255
[alpha] => 255
[pitch] => 0
[advanced] => true
[animation] => Array
(
)
[aniSpeed] => 50
)
[7] => Array
(
[x] => 23.6418
[y] => 1.14782
[z] => 0
[scale] => 0.375
[rot] => 3.14159
[file] => doodads\underground\terrain\SupportBeam\SupportBeam.mdl
[red] => 255
[green] => 255
[blue] => 255
[alpha] => 255
[pitch] => 0
[advanced] => true
[animation] => Array
(
)
[aniSpeed] => 50
)
[8] => Array
(
[x] => -0.853416
[y] => 28.6001
[z] => 0
[scale] => 0.375
[rot] => 4.71239
[file] => doodads\underground\terrain\SupportBeam\SupportBeam.mdl
[red] => 255
[green] => 255
[blue] => 255
[alpha] => 255
[pitch] => 0
[advanced] => true
[animation] => Array
(
)
[aniSpeed] => 50
)
[9] => Array
(
[x] => -29.9152
[y] => -2.23644
[z] => 0
[scale] => 0.375
[rot] => 0
[file] => doodads\underground\terrain\SupportBeam\SupportBeam.mdl
[red] => 255
[green] => 255
[blue] => 255
[alpha] => 255
[pitch] => 0
[advanced] => true
[animation] => Array
(
)
[aniSpeed] => 50
)
[10] => Array
(
[x] => 17.4502
[y] => 26.4197
[z] => 12.8
[scale] => 0.3
[rot] => 3.92699
[file] => doodads\underground\terrain\SupportBeam\SupportBeam.mdl
[red] => 255
[green] => 255
[blue] => 255
[alpha] => 255
[pitch] => 0
[advanced] => true
[animation] => Array
(
)
[aniSpeed] => 50
)
[11] => Array
(
[x] => -2.60881
[y] => -30.1058
[z] => 0
[scale] => 0.375
[rot] => 1.5708
[file] => doodads\underground\terrain\SupportBeam\SupportBeam.mdl
[red] => 255
[green] => 255
[blue] => 255
[alpha] => 255
[pitch] => 0
[advanced] => true
[animation] => Array
(
)
[aniSpeed] => 50
)
[12] => Array
(
[x] => -17.5015
[y] => 29.2248
[z] => 12.8
[scale] => 0.3
[rot] => 5.49779
[file] => doodads\underground\terrain\SupportBeam\SupportBeam.mdl
[red] => 255
[green] => 255
[blue] => 255
[alpha] => 255
[pitch] => 0
[advanced] => true
[animation] => Array
(
)
[aniSpeed] => 50
)
[13] => Array
(
[x] => -23.7949
[y] => -25.4963
[z] => 12.8
[scale] => 0.3
[rot] => 0.959931
[file] => doodads\underground\terrain\SupportBeam\SupportBeam.mdl
[red] => 255
[green] => 255
[blue] => 255
[alpha] => 255
[pitch] => 0
[advanced] => true
[animation] => Array
(
)
[aniSpeed] => 50
)
[14] => Array
(
[x] => 25.4455
[y] => -24.2075
[z] => 12.8
[scale] => 0.3
[rot] => 2.18166
[file] => doodads\underground\terrain\SupportBeam\SupportBeam.mdl
[red] => 255
[green] => 255
[blue] => 255
[alpha] => 255
[pitch] => 0
[advanced] => true
[animation] => Array
(
)
[aniSpeed] => 50
)
)
[dmgTable] => Array
(
)
[triggers] => Array
(
[0] => Array
(
[name] => On Level Up
[code] => call LevelUpCopters(tower)
[values] => Array
(
[visible] => true
[icon] => ReplaceableTextures\CommandButtons\BTNStatUp.blp
[name] => Special Training
[short_explain] => On higher levels, copters gain special abilities.
[long_explain] => On higher levels the copters specialize.|n|nOn level |cffFFFF807|r: Copter |cffFFFF801|r has its damage type changed to |cffFFA020Elemental|r, each rocket's AoE is increased by |cffFFFF8025%|r and the attacks gain a napalm modifier. Napalm causes a |cffFFFF8020%|r slow and |cffFFFF8050%|r of the tower's attack damage as |cffFFA020Elemental|r damage per second for |cffFFFF805|r seconds.|n|nOn level |cffFFFF8015|r: Copter |cffFFFF802|r will change its machine-gun-missiles to a long ranged tesla coil, changing the damage type to |cff00FFFFEnergy|r and increasing attack range to |cffFFFF802140|r. Furthermore its armor reduction base effect is increased to |cffFFFF8050%|r, but the slow is decreased to |cffFFFF8010%|r.|n|nOn level |cffFFFF8025|r: Copter |cffFFFF803|r will become a legendary Ghost Warrior. Ghost Warriors have an on-board teleportation device, allowing them to teleport behind targets every |cffFFFF805|r seconds. Shooting delays the charging of the teleportation device.
)
)
[1] => Array
(
[name] => Header
[code] => globals
ProjectileType Copter
BuffType CopterSlow
BuffType CopterArmor
BuffType CopterNapalm
endglobals
struct Coptersropters
Projectile array p[3]
endstruct
struct deemfade
Projectile p = 0
Unit u = 0
integer UID = 0
integer UIDt = 0
integer r = 255
integer g = 255
integer b = 255
integer a = 255
integer int = 0
endstruct
function CopterShotHit takes real x, real y, Tower tower, integer isNapalm, integer size returns nothing
local real aoe = 140
local Iterate I = Iterate.overUnitsInRange(tower,TARGET_CREEPS,x,y ,aoe+aoe/4*isNapalm) //Sp.userInt will be 1 on napalm, 0 on others;
local Unit u
local Buff b
local real health
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\GyroCopter\\GyroCopterMissile.mdl",x,y))
loop
set u = I.next()
exitwhen u == 0
set health = GetWidgetLife(u.getUnit())
if isNapalm == 1 then
call tower.doCustomAttackDamage(u,tower.getCurrentAttackDamageWithBonus(),tower.calcAttackMulticrit(0,0,0),AttackType.ELEMENTAL)
if GetWidgetLife(u.getUnit()) < health then
set b = CopterNapalm.apply(tower,u,0)
if tower.getCurrentAttackDamageWithBonus()*0.5 > b.userReal then
set b.userReal = tower.getCurrentAttackDamageWithBonus() * 0.5
set b.userInt = tower.getUID()
endif
call CopterSlow.apply(tower, u, 40)
call CopterArmor.apply(tower,u,tower.getLevel())
endif
else
call tower.doCustomAttackDamage(u,tower.getCurrentAttackDamageWithBonus(),tower.calcAttackMulticrit(0,0,0),AttackType.PHYSICAL)
if GetWidgetLife(u.getUnit()) < health then
call CopterSlow.apply(tower, u, 40)
call CopterArmor.apply(tower,u,tower.getLevel())
endif
endif
endloop
endfunction
function deem_fade takes nothing returns nothing
local timer t = GetExpiredTimer()
local deemfade d = GetTimerData(t)
local Projectile p = d.p
if d.UIDt == p.getCaster().getUID() then
set d.int = d.int + 1
if d.int == 10 and d.UID == d.u.getUID() then //if d.int = 10, jump to target
set p.speed = 300
set p.direction = GetUnitFacing(d.u.getUnit()) //set copter facing to target facing
set p.x = d.u.getX() - Cos(p.direction*bj_DEGTORAD)*(250*3+100) //move copter from target's position to maximum attack range
set p.y = d.u.getY() - Sin(p.direction*bj_DEGTORAD)*(250*3+100) //move copter from target's position to maximum attack range
endif
//0-10 fade out, 10-15 fade in
if d.int > 10 then
call p.color(d.r,d.g,d.b,R2I((d.int-10)*d.a/5)) //fade in
else
call p.color(d.r,d.g,d.b,R2I(d.a-d.int*(d.a/10))) //fade out
endif
if d.int == 15 then //if faded in
call ReleaseTimer(t)
call d.destroy()
endif
else
call ReleaseTimer(t)
call d.destroy()
endif
endfunction
/////////////////////////////////////////////
/////////////////////////////////////////////
function UPANDRUN takes Projectile p, Unit target returns nothing
local timer t = NewTimer()
local deemfade d = deemfade.create()
local real period = 0.1 //this value * 10 = delay between cast and teleport
set d.p = p
set d.u = target
set d.UID = target.getUID()
set d.UIDt = p.getCaster().getUID()
if p.userInt2 == 1 then
set d.g = 120
set d.b = 120
endif
call SetTimerData(t,d)
call TimerStart(t, period, true, function deem_fade)
endfunction
/////////////////////////////////////////////
/////////////////////////////////////////////
function deem_anglestuff takes Projectile p, real x, real y, real turn, real max returns nothing //Principle of operation is to have copter angles between 0 and 360
//Then check for copter facing and angle between copter and target between -180 and 180, reformat if over 180 difference
local real angle = Atan2(y - p.y, x -p.x)*bj_RADTODEG //angle between Copter and Target
local real anglediff = angle - p.direction //angle Copter needs to turn to face towards Target
if anglediff > 180 then // Changes angledifferences to -180 to 180 area
set anglediff = anglediff -360 // so that we can find which way is the shorter turn
elseif anglediff < -180 then
set anglediff = anglediff + 360
endif
if anglediff > max then // Uses the shorter turn, and only turns if the anglediff is large enough (if the copter is facing towards the tower, it won't turn)
set p.direction = p.direction + turn
endif
if anglediff < -max then
set p.direction = p.direction - turn
endif
//This is to keep the p.direction between 0 and 360, I think, seems to work
if p.direction < 0 then
set p.direction = p.direction+360
endif
if p.direction > 360 then
set p.direction = p.direction-360
endif
endfunction
/////////////////////////////////////////////
/////////////////////////////////////////////
function Copter_Periodic takes Projectile p returns nothing
local boolean fewerl //used to decrease amount of lightning effects with tesla-copter
local real aoe = 140 //AoE to check with at each shot-centre
local real dist = 250 // distance between shot-centers
local Lightning l
local Tower tower = p.getCaster()
local real loopx
local real loopy
local Iterate loopI
local Unit u
local boolean Shoot = false
local real dx = tower.getX()-p.x // x-distance from Tower
local real dy = tower.getY()-p.y // y-distance from Tower
local real range = dx * dx + dy * dy //range between Copter and Tower squared, since squareRoot is slow
local real cosDirDist //Geometric functions are slow too (but ghost teleportation uses p.direction, I can't initialize these here --- doing it after ghost tele logic)
local real sinDirDist //Also always multiplied by dist, so precalcing that too
local integer loops = 3 //used by GHOST, DETERMINE SHOOT & TESLA; reinitialized & used by SHOOT, pretty much used as a temporary integer
local real tesla = 0
local real health = 0
//TESLA
//TESLA, range increase
if (p.userInt2 == 2) then
set loops = 8 //increases range & shot count
set tesla = aoe/2
endif
//GHOST (TELEPORTATION)
//GHOST (TELEPORTATION)
if (p.userInt2 == 3) then //if ghost-copter
if p.userInt3 == 20 then //wait for target
set loopI = Iterate.overUnitsInRange(tower,TARGET_CREEPS,p.x,p.y ,dist*loops*3) //search teleport targets from ~3x range
set u = loopI.next()
if u != 0 then //if target found
call loopI.destroy()
set p.userInt3 = 21 //start fading in
set p.direction = GetUnitFacing(u.getUnit())+GetRandomReal(-15,15) //set copter facing to target facing
set p.x = u.getX() - Cos(p.direction*bj_DEGTORAD)*(dist*loops) //move copter from target's position to maximum attack range
set p.y = u.getY() - Sin(p.direction*bj_DEGTORAD)*(dist*loops) //move copter from target's position to maximum attack range
endif
else
set p.userInt3 = p.userInt3 + 1 //0-15 fade out, 15 wait for target, 15-20 fade in
if p.userInt3 > 20 then
call p.color(80,80,80,R2I(63+(p.userInt3-21)*48)) //fade in
else
call p.color(80,80,80,R2I(255-p.userInt3*9.6)) //fade out
endif
if p.userInt3 == 25 then //if faded in
set p.userInt3 = 0 //start fading out again
endif
endif
endif
//PRECALCULATIONS
set cosDirDist = Cos(p.direction*bj_DEGTORAD)*dist
set sinDirDist = Sin(p.direction*bj_DEGTORAD)*dist
//DETERMINE SHOOT, & TESLA shot
//DETERMINE SHOOT, & TESLA shot
loop //find targets if there are any to shoot, do tesla stuff if tesla-copter
exitwhen loops == 0 //Should probably reverse the order, because it now chases the furthest target
set loopx = p.x + cosDirDist*loops //x for iterate
set loopy = p.y + sinDirDist*loops //y for iterate
set loopI = Iterate.overUnitsInRange(tower,TARGET_CREEPS,loopx,loopy ,aoe+tesla) //iterate over units in a
set loops = loops -1 //slightly larger area than half the distance between shots
set u = loopI.next()
if u != 0 then
call deem_anglestuff(p,u.getX(), u.getY(),6,4) //Chase target
set fewerl = true // don't do lightning effect on every unit;
//could do point2point lightning, but then I'd need to check for air for visuals
//if TESLA
if (p.userInt2 == 2) then //if TESLA-COPTER
set p.speed = 300
loop
if fewerl then
set l = Lightning.createFromPointToUnit("CHIM",p.x,p.y,p.z,u)
call l.setLifetime(0.12)
set fewerl = false
endif
set health = GetWidgetLife(u.getUnit())
call tower.doCustomAttackDamage(u,tower.getCurrentAttackDamageWithBonus(),tower.calcAttackMulticrit(0,0,0),1)
if GetWidgetLife(u.getUnit()) < health then
call CopterArmor.apply(tower,u,tower.getLevel()+50)
call CopterSlow.apply(tower, u, 0)
endif
set u = loopI.next()
exitwhen u == 0
endloop
else //if NOT TESLA, if unit found: set shoot & quit loop, else check next aoe for unit
call loopI.destroy()
set Shoot = true
set loops = 0
endif
endif
endloop
//SHOOT, NOT TESLA
//SHOOT, NOT TESLA
if Shoot then
set p.speed = 300 // this is (480-300)/30*0.2 = 1.2 seconds of going straight
set loops = 3
//if ghost and shooting, delay fading
if (p.userInt2 == 3 and p.userInt3 > 0 and p.userInt3 < 20) then
set p.userInt3 = p.userInt3 - 1
endif
loop
exitwhen loops == 0
set loopx = p.x + cosDirDist*loops //shot-x
set loopy = p.y + sinDirDist*loops //shot-y
if p.userInt2 == 1 then //NAPALM
call CopterShotHit(loopx,loopy,tower,1, u.getSize())
else
call CopterShotHit(loopx,loopy,tower,0, u.getSize())
endif
set loops = loops - 1
endloop
endif
//TURN
//TURN (And speed regain)
if p.speed < 480 then
set p.speed = p.speed + 30 // 120 speed per
elseif range > 550*550 then //Turn towards tower; Does not turn if speed is lowered (which happens when shooting)
call deem_anglestuff(p,tower.getX(), tower.getY(),13+p.userInt,25)
endif
endfunction
/////////////////////////////////////////////
/////////////////////////////////////////////
function Periodic_CopterNapalm takes Buff b returns nothing
local Tower tower = b.userInt
//some UID check? dunno
call tower.doCustomAttackDamage(b.getBuffedUnit(),b.userReal,tower.calcAttackMulticrit(0,0,0),AttackType.ELEMENTAL)
endfunction
/////////////////////////////////////////////
/////////////////////////////////////////////
function LevelUpCopters takes Tower tower returns nothing
local Coptersropters c = tower.userInt
local Projectile p = c.p[0]
if tower.getLevel() >= 7 then //check for tower level
set p.userInt2 = 1 //set selected copter special type active
call p.color(255,120,120,255) //set copter color
else
set p.userInt2 = 0 //disable special type
call p.color(255,255,255,255) //reset copter color
endif
set p = c.p[1]
if tower.getLevel() >= 15 then
set p.userInt2 = 2
call p.color(120,120,255,255)
else
set p.userInt2 = 0
call p.color(255,255,255,255)
endif
set p = c.p[2]
if tower.getLevel() >= 25 then
set p.userInt2 = 3
call p.color(80,80,80,255)
set p.userInt3 = 0
else
set p.userInt2 = 0
call p.color(255,255,255,255)
endif
endfunction
////
function napalm_onCreate takes Buff B returns nothing
set B.userReal = 0 // when applying Napalm, b.userReal is checked if it's lower before setting it, so we need to initialize it here
endfunction
//Do not remove or rename this function!
//Put your initialization tasks here, this function will be called on map init
private function init takes nothing returns nothing
local Modifier m=Modifier.create()
call m.addModification(MOD_MOVESPEED,-0.1,-0.01)
set CopterSlow=BuffType.create(0.8,0,false)
call CopterSlow.setBuffIcon('@@0@@')
call CopterSlow.setBuffModifier(m)
set m=Modifier.create()
call m.addModification(MOD_ARMOR_PERC,-0.3,-0.004)
set CopterArmor=BuffType.create(0.8,0,false)
// call CopterArmor.setBuffIcon('@@2@@')
call CopterArmor.setBuffModifier(m)
set m=Modifier.create()
call m.addModification(MOD_MOVESPEED,-0.2,0)
set CopterNapalm=BuffType.create(5.0,0,false)
call CopterNapalm.setBuffIcon('@@1@@')
call CopterNapalm.setBuffModifier(m)
call CopterNapalm.addPeriodicEvent(Periodic_CopterNapalm,1)
call CopterNapalm.addEventOnCreate(napalm_onCreate)
set Copter = ProjectileType.create( "units\\human\\Gyrocopter\\Gyrocopter.mdl", 999999.00, 10.00 )
call Copter.enablePeriodic( Copter_Periodic, 0.25 )
endfunction
[values] => Array
(
[visible] => true
[icon] => ReplaceableTextures\CommandButtons\BTNFlyingMachine.blp
[name] => Helicopter Zone
[short_explain] => |cffFFFF803|r helicopters circle around the tower trying to stay within |cffFFFF801000|r range of it. The helicopters attack targets in front of them, dealing the tower's attack damage and applying a slow and an armor reduction. |r|n|cffEE0000The helicopters are not affected by attack speed.
[long_explain] => |cffFFFF803|r helicopters circle around the tower trying to stay within |cffFFFF801000|r range of it. If there are targets in front of a helicopter, it will attack them dealing the tower's attack damage as |cffC0C0C0Physical|r damage.|nHelicopters attack every |cffFFFF800.25|r seconds with a barrage of |cffFFFF803|r missiles spaced |cffFFFF80250|r range apart and exploding in |cffFFFF80140|r AoE. Damaged targets are slowed by |cffFFFF8050%|r and their armor is reduced by |cffFFFF8030%|r for |cffFFFF800.8|r seconds.|r|n|cffEE0000Not affected by attack speed.|r|n|n|cffFF8000Level Bonus:|r|n|cffFFFF80+0.4%|r armor reduction
)
)
[2] => Array
(
[name] => On Tower Destruction
[code] => local Coptersropters c = tower.userInt
local Projectile p
local integer i = 0
loop
set p = c.p[i]
call p.destroy()
set i = i+1
exitwhen i == 3
endloop
call c.destroy()
[values] => Array
(
[visible] => false
[icon] =>
[name] =>
[short_explain] =>
[long_explain] =>
)
)
[3] => Array
(
[name] => On Damage
[code] => set Event.damage = 0
[values] => Array
(
[ONDAMAGE_chance] => 1.0
[visible] => false
[icon] =>
[name] =>
[short_explain] =>
[ONDAMAGE_chanceLevelAdd] => 0.0
[long_explain] =>
)
)
[4] => Array
(
[name] => Autocast
[code] => local Coptersropters c = tower.userInt
local Projectile p = c.p[0]
call UPANDRUN(p,Event.getTarget())
[values] => Array
(
[AUTOCAST_cooldown] => 15
[AUTOCAST_autoRange] => 1000
[AUTOCAST_manacost] => 0
[icon] => ReplaceableTextures\CommandButtons\BTNMarksmanship.blp
[AUTOCAST_range] => 1000
[AUTOCAST_targetType] => 0
[AUTOCAST_numBuffsBeforeIdle] => 0
[caster_art] =>
[long_explain] => Copter |cffFFFF801|r will teleport behind the target after a delay of |cffFFFF801|r second.
[target_art] =>
[AUTOCAST_autocastType] => AC_TYPE_OFFENSIVE_UNIT
[AUTOCAST_buffType] => 0
[AUTOCAST_isExtended] => false
[name] => Targeted Run
[AUTOCAST_targetSelf] => false
[short_explain] => Copter |cffFFFF801|r will teleport behind the target after a delay of |cffFFFF801|r second.
)
)
[5] => Array
(
[name] => On Tower Creation
[code] => local real x = tower.getX()
local real y = tower.getY()
local Projectile p
local Coptersropters c = Coptersropters.create()
local integer i = 0
set tower.userInt = c
loop
set p = Projectile.createFromUnit(Copter,tower,tower,i*120,0,0)
set p.z = 225
set p.x = p.x + (i-1)*-80
set p.y = p.y + (i-1)*(i-1)*80-40
set p.userInt = i //Somewhat obsolete, can be removed/replaced if so liked (just remember to remove its use in turning function calls)
set p.userInt2 = 0 //Used to identify copter type (0 = base, 1 = napalm, 2 = tesla, 3 = ghost)
set p.userInt3 = 0 //Used by ghost-copter's fade; has to be initialized for it
set c.p[i] = p
set i = i + 1
exitwhen i == 3
endloop
call LevelUpCopters(tower)
[values] => Array
(
[visible] => false
[icon] =>
[name] =>
[short_explain] =>
[long_explain] =>
)
)
)
[abilities] => Array
(
)
[buffs] => Array
(
[0] => Array
(
[id] => @@0@@
[derivedFrom] => Bult
[oeValues] => Array
(
[EditorName] => Helicopter Buff
[Buffubertip] => This unit is slowed and its armor is reduced.
[Bufftip] => Helicopter Buff
[Buffart] => ReplaceableTextures\CommandButtons\BTNFlyingMachine.blp
)
)
[1] => Array
(
[id] => @@1@@
[derivedFrom] => Bult
[oeValues] => Array
(
[EditorName] => Helicopter Napalm
[Buffubertip] => This unit is being slowed and damaged over time.
[TargetArt] => Abilities\Spells\Orc\LiquidFire\Liquidfire.mdl
[Bufftip] => Helicopter Napalm
[Buffart] => ReplaceableTextures\CommandButtons\BTNFlyingMachine.blp
)
)
[2] => Array
(
[id] => @@2@@
[derivedFrom] => Bult
[oeValues] => Array
(
[EditorName] => Helicopter Armor Reduction
[Buffubertip] => This unit has its armor reduced.
[Bufftip] => Helicopter Armor Reduction
[Buffart] => ReplaceableTextures\CommandButtons\BTNFlyingMachine.blp
)
)
)
[units] => Array
(
)
[references] => Array
(
)
)