after like some time after you play the game, an error pops up (closestEnemy is undefined or smth)
https://studio.code.org/projects/gamelab/JwkCyKbpBA1F4HA7rRhXHOt57bJrRDjYDCcwGHbUZn8/edit
after like some time after you play the game, an error pops up (closestEnemy is undefined or smth)
https://studio.code.org/projects/gamelab/JwkCyKbpBA1F4HA7rRhXHOt57bJrRDjYDCcwGHbUZn8/edit
that means the closest enemy is undefined lmao
pluto
here i cleaned up some stuff and made most of the game functional:
u can use this if you want or not(might be too messy or complicated)
https://studio.code.org/projects/gamelab/2wHo4DxzRs1Jcy6duVnmpU-n_tDoeAGSHbO5r-mQnCc
also idk how to clear up the lag it might be my bad coding or just CDO
ackvonhuelio you just did the whole entire game for me which was uh not expected
ackvonhuelio and yes this is complicated
ackvonhuelio yeah you damn well need to give me a documentation on this because i have no clue of how this works
ackvonhuelio teach me how u do font thing
-wyi that was me and i used impixel's official codeorg forum post
https://forum.code.org/t/font-question-for-game-lab/35924/3?u=pluto
Would you guys mind if I used this as the code basis for a game where it's tower vs tower and they move?
Sorta like starcraft but also not.
You play as a person who's goal is to A: Survive
and B: Keep people from dying.
You are caught in the crossfire of 2 sides:
One is 2 incredibly strong fighters, With high move speeds, regen abilities, heavy yet fast melee attacks, and the ability to launch missles which deal splash damage, and lasers cutter attacks, which have to lock on a target first.
The other is basically just normal people, in far larger numbers. They have several classes:
Boss: Voxel. Flame thrower, fire capsule (splash damage grenade), Holograms, and can call in RC-probe things to support him. High health.
Standard soldier: Shotgun, fire capsule. moderate health.
Arsonist: Can place down a fire turret, can call in probes (these ones shoot fire). Fire capsules.
Inhibitor: Can place down fire turrets, call in probes, place holograms of both allies and enemies,
pluto
not even close
i didn't implement:
moneys
abilities
winning
losing
more than 1 level
loadout selection
so theres plenty more for u to do
pluto
so basically what i did:
// to remind you how a for loop works:
for(var i = 0; i < array.length; i++){
// create variable i and iterate from zero to the length of the array
console.log(array[i]);
// print the ith object in the array, since i goes from zero to the length of the array everything in the array is printed
}
enemy.health
gives current health, enemy.data.health
gives the max health of all enemies of that type.-wyi
if you can understand my messy code sure i guess
ackvonhuelio Your stuff is confusing but I'll figure it out well enough with time.
[unknown] i thought i had a basic knowledge of arrays, but i don't lol
ackvonhuelio
What do the variables "i" and "q" on lines 325 - 347 do? I'm kinda just trying to use to code as a way to make an A.I. that shoots other A.I.s of different factions.