User prompt
when enemy middle right is destroyed 6. **Update `eventTxt`**: The text displaying the current event is updated to 'Event: None'. 7. **Reset `randomEvent`**: The variable holding the current random event is reset to an empty string.
User prompt
when EnemyMiddleRight is destroyed, event is completed
User prompt
change `objsphere` instances are instantiated 4 seconds after `objwindup` is created.
User prompt
changed that to 5
Code edit (13 edits merged)
Please save this source code
User prompt
apply randomness to obj spheres X movement
User prompt
add a variation in the X movement for obj sphere
User prompt
execute attack pattern b 1 second after objlaser is destroyed
User prompt
add boundaries to objsphere, they cannot leave the playspace vertically
User prompt
the spheres movement is too fast and erratic, make a pattern that is smooth and readable for players
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: objWindup is not defined' in or related to this line: 'if (objWindup && typeof objWindup.update === 'function') {' Line Number: 1494
User prompt
add a fast rotation to objwindup
User prompt
rather than 2 seconds, wait three seconds before replacing objwindup and objlaser should appear on screen for five seconds
User prompt
can you fix it
User prompt
also make sure when they are instantiated that they are instantiated on the playspace and not outside of it
User prompt
make sure objwindup and objlaser are above objenemyright
User prompt
objwindup should be instantiated for two seconds and then replaced by obj laser for 3 seconds when obj laser is destroyed then wait 2 seconds before starting attack pattern b
User prompt
make sure attack pattern A starts when EnemyMiddleRight has reached its target position of `targetX = game.width - 100`
User prompt
remove its fade in
User prompt
obj sphere move too quickly
User prompt
EnemyMiddleRight does attack pattern A first and after Attack pattern B
User prompt
EnemyMiddleRight selects between attack pattern A and Attack pattern B three times total
User prompt
attack pattern B is instantiating every 3 seconds for 12 seconds obj spheres that move in an arc (up and down) starting from enemy towards the left of the playspace where they are destroyed
User prompt
Attack Pattern A is objwindup instantiated fading in over 2 seconds in the center of enemy for 2 seconds and then replacing it by objlaser that shakes a bit
===================================================================
--- original.js
+++ change.js
@@ -191,59 +191,10 @@
self.jetfuelInterval = LK.setInterval(function () {
jetfuel.scale.x *= -1;
}, 250);
self.on('destroy', function () {
- isEventOngoing = false;
eventTxt.setText('Event: None');
randomEvent = "";
- distanceTraveled += 100;
- LK.getSound('snd_powerup').play();
- LK.getSound('snd_nice').play();
- destroyAllObjs();
- var originalIncrement = 1 / 60;
- var acceleratedIncrement = 1 / 15;
- distanceTraveledIncrement = acceleratedIncrement;
- var originalParallaxSpeed = parallax.speed;
- parallax.speed *= 5;
- var shakeAmplitude = 10;
- var shakeDuration = 100;
- var originalX = game.x;
- var originalY = game.y;
- var shakeInterval = LK.setInterval(function () {
- game.x = originalX + (Math.random() - 0.5) * shakeAmplitude;
- game.y = originalY + (Math.random() - 0.5) * shakeAmplitude;
- }, shakeDuration);
- LK.effects.flashScreen(0xffffff, 5000);
- var objRush = LK.getAsset('objRush', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- objRush.x = game.width / 2;
- objRush.y = game.height / 2;
- objRush.alpha = 0;
- game.addChild(objRush);
- var fadeInInterval = LK.setInterval(function () {
- objRush.alpha += 0.05;
- if (objRush.alpha >= 1) {
- LK.clearInterval(fadeInInterval);
- LK.setTimeout(function () {
- var fadeOutInterval = LK.setInterval(function () {
- objRush.alpha -= 0.05;
- if (objRush.alpha <= 0) {
- LK.clearInterval(fadeOutInterval);
- objRush.destroy();
- }
- }, 50);
- }, 3000);
- }
- }, 50);
- LK.setTimeout(function () {
- distanceTraveledIncrement = originalIncrement;
- parallax.speed = originalParallaxSpeed;
- LK.clearInterval(shakeInterval);
- game.x = originalX;
- game.y = originalY;
- }, 5000);
LK.clearInterval(self.jetfuelInterval);
});
self.dashSpeed = game.width / 2 / 30; // 1/2 of the screen over 0.5 seconds at 60FPS
self.dashBackSpeed = self.dashSpeed / 2; // Accelerated return at half of the dash speed
2d cyberpunk particle of a dash ability. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
blue jetfuel. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art speech bubble that says "?" neon color. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art speech bubble that says "Go" neon color. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art speech bubble that says "Ok" neon color.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a bubble a wing inside in neon color.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art bubble with 2 fast foward arrows neon color. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Gray Cyber neon lit logo of the word Rush. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
side profile of a flying car in the art style of a 16 bit neon cyberpunk game. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
retro cyberpunk datadisk in neon colors. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
retro cyberpunk pole flag in neon colors with the words 'events' on it.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
retro sign that says "Hold to Dash" in neon colors. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
retro sign that says "Tap to Move" in neon colors.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
retro sign that says "catch" with an flying drone symbol in neon colors.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
retro flying drone in neon colors.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
retro sign that says "Survive" with an face symbol in neon colors... Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
neon colored cyberpunk round electricity. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
SynthwaveMusic
Music
snd_letsgo
Sound effect
snd_announcer
Sound effect
snd_powerup
Sound effect
snd_dataacquire
Sound effect
snd_walkie
Sound effect
snd_nice
Sound effect
snd_carhonk
Sound effect
snd_enemy
Sound effect
snd_sphere
Sound effect
snd_windup
Sound effect
snd_spikey
Sound effect
snd_drone
Sound effect