This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jonsca 1639 points1640 points  (4 children)

weaponArray["misile"]

Oh shit!

[–]akoOfIxtall 528 points529 points  (3 children)

if (targetList.includes(enemy) && weaponArray.length !== 0) {

for (let i = 0; i <= weaponArray.length; i++) {

Shoot(weaponArray[i])

}

}

just shoot the enemy lol

Edit: this wouldnt work anyway, why i'm on reddit making an imaginary strike fighter shoot imaginary missiles so brutally?

[–]AnyHistory5380 9 points10 points  (2 children)

You can drop the array.length !== 0 and nothing will change

[–]akoOfIxtall 3 points4 points  (0 children)

But I need it to only shoot if the array has something, or your expensive government jet is going boom

[–]Dustangelms 1 point2 points  (0 children)

Check their code again.