Code edit (4 edits merged)
Please save this source code
User prompt
boss hitpoits and speed should be multiplied by its spawncount. staring always at 1
User prompt
add a counter on each boss to keep track of how many times it has spawned.
Code edit (1 edits merged)
Please save this source code
User prompt
after a level is complete, set its index of wave back to 0
User prompt
make sure boss2 and boss3 also move like boss1
User prompt
ensure currentwaveinde is rested to 0 at the start of each level
User prompt
when level change, check level, and start from first wave on that level
User prompt
when a level is restarted make sure enemy waves are also started again
User prompt
levels should be played in loop. when the first 3 levels are complete, number one should start again, but harder, and so should be the boss
User prompt
add 3 more levels
User prompt
when a new level starts increase speed of start in the background and enemies by 10%
User prompt
when boss3 is destroyed, start level 1 again.
Code edit (1 edits merged)
Please save this source code
User prompt
when diamond is collected play diamondcollect sound
User prompt
Please fix the bug: 'Timeout.tick error: Cannot read properties of undefined (reading 'children')' in or related to this line: 'enemies[j].children[0].tint = 0xffffff; // Revert tint back to white' Line Number: 1051
User prompt
when enemy2 and boss is hit, change tint for a millisecond
User prompt
enemy2 and boss should have a slight effect when hit
User prompt
flicker shoudl last shorter
User prompt
make flicker lighter
User prompt
make enemy2 and boss flicker when they are hit
User prompt
only apply shield when powerup3 is selected, not when powerup1 or powerup2 are
User prompt
remove wait for 2 seconds between boss is destroyed and powerup menu is shown
User prompt
only apply this last big explossion and flash to boss, not all other enemies
User prompt
make boss explossion way bigger and flashier
===================================================================
--- original.js
+++ change.js
@@ -953,8 +953,9 @@
if (game.children[i] instanceof Diamond && game.children[i].intersects(fairy)) {
game.children[i].destroy();
diamondCount++;
diamondCounterTxt.setText(diamondCount);
+ LK.getSound('diamondcollect').play(); // Play diamondcollect sound when a diamond is collected
}
}
// Update bullets
for (var i = bullets.length - 1; i >= 0; i--) {
@@ -1011,20 +1012,8 @@
LK.getSound('hit').play(); // Play hit sound when HeroBullet, HeroBullet2, or HeroBullet3 is destroyed
bullets[k].destroy();
bullets.splice(k, 1);
enemies[j].hitpoints -= bullets[k] instanceof HeroBullet2 ? 2 : bullets[k] instanceof HeroBullet3 ? 3 : 1;
- if (enemies[j] instanceof Enemy2 && enemies[j].children.length > 0) {
- enemies[j].children[0].tint = 0xff0000; // Change tint to red
- LK.setTimeout(function () {
- enemies[j].children[0].tint = 0xffffff; // Revert tint back to white
- }, 1);
- }
- if ((enemies[j] instanceof Boss || enemies[j] instanceof Boss2 || enemies[j] instanceof Boss3) && enemies[j].children.length > 0) {
- enemies[j].children[0].tint = 0xff0000; // Change tint to red
- LK.setTimeout(function () {
- enemies[j].children[0].tint = 0xffffff; // Revert tint back to white
- }, 1);
- }
if (enemies[j].hitpoints <= 0) {
var enemyX = enemies[j].x;
var enemyY = enemies[j].y;
// Create particle effect
8-bit. cartoon. white star.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
cartoon 8 bit fairy dust. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cartoon, 8bit, fireball. Black border. Cicular.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
cartoon, 8 bit, shield. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
8bit, cartoon, axe. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
dark electric ball, 8bit, cartoon.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
8bit, cartoon, treasure chest frame. very big empty center. only a fine border of chest. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
shoot
Sound effect
boom
Sound effect
Hit
Sound effect
backgroundmusic
Sound effect
bossbullet
Sound effect
bossappear
Sound effect
hit
Sound effect
diamondcollect
Sound effect
hooray
Sound effect
nono
Sound effect
letsgo
Sound effect
death
Sound effect
yes
Sound effect