User prompt
Please fix the bug: 'Timeout.tick error: tween is not defined' in or related to this line: 'tween(textObject, {' Line Number: 980 ↪💡 Consider importing and using the following plugins: @upit/tween.v1
Code edit (12 edits merged)
Please save this source code
User prompt
increase the speed of the scaling up of the enemies
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
in room2, if room2state.ismedallionb instantiate se_medallionb
User prompt
if room2STATE.is_medalliona ==true, instantiate se_madalliona at room2state.medallionaX and medallionay
Code edit (3 edits merged)
Please save this source code
User prompt
in room2, instantiate krampusframe at room2state.medallionplaquex and medallionplaquey
Code edit (3 edits merged)
Please save this source code
User prompt
on inventory full, do not destroy the asset
Code edit (1 edits merged)
Please save this source code
User prompt
set max alpha for medallionA to 75
Code edit (16 edits merged)
Please save this source code
User prompt
in room3() if room3state.is_medallion_found == false, instantiate the se_medallionA on click it should be added to inventory
Code edit (1 edits merged)
Please save this source code
User prompt
in room2 add s_breaking sound to breakable breaking
User prompt
change collectible found text to white
Code edit (1 edits merged)
Please save this source code
User prompt
put an outline in white around the collectible found text
User prompt
collectible found text should be in red
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'setText')' in or related to this line: 'collectibleCounterText.setText(collectibleCounter + "/" + maxCollectibles);' Line Number: 319
User prompt
in the default collectible down function add that the text "Collectible found!" shows at the place of the collectible and disappears after 2 seconds
User prompt
remove the collectibletext that displays how many colectibles have been found
===================================================================
--- original.js
+++ change.js
@@ -8,9 +8,9 @@
****/
var BreakableAsset = Container.expand(function () {
var self = Container.call(this);
// Attach the breakable asset
- var breakableGraphics = self.attachAsset('bg_BreakableDoll', {
+ var breakableGraphics = self.attachAsset('bg_KrampusBreakable', {
anchorX: 0.5,
anchorY: 0.5
});
// Define the down event for the breakable asset
@@ -111,9 +111,9 @@
// Scale up
self.scaleX += self.scaleFactor;
self.scaleY += self.scaleFactor;
// Check if the enemy has reached the center and scaled up
- if (Math.abs(self.x - 2048 / 2) < 5 && Math.abs(self.y - 2732 / 2) < 5 && self.scaleX >= 4) {
+ if (Math.abs(self.x - 2048 / 2) < 5 && Math.abs(self.y - 2732 / 2) < 5 && self.scaleX >= 3) {
// Stop movement and scaling
self.speed = 0;
self.scaleFactor = 0;
// Stop the wobble effect on the enemy
@@ -440,10 +440,8 @@
is_lockKrampus_unlocked: false,
is_collectible_found: false,
is_attack_done: false,
is_medallion_found: false,
- // lockLightX: 600,
- // lockLightY: 1100,
lockDollX: 500,
lockDollY: 1500,
lockKrampusX: 2048 / 2 + 25,
lockKrampusY: 1450,
@@ -2000,81 +1998,8 @@
fadeInObj(room05, 3000);
// Spawn enemies at random intervals for 6 seconds
if (!room5State.is_attack_done) {
LK.getSound('s_EncounterMusic').play();
- var enemyCount = Math.floor(Math.random() * 6) + 10; // Random number between 10 and 15
- for (var i = 0; i < enemyCount; i++) {
- LK.setTimeout(function () {
- var enemyType = Math.random() < 0.5 ? 'bg_Doll01' : 'bg_Doll02';
- var enemy = new Enemy(enemyType);
- enemy.x = Math.random() * 2048;
- enemy.y = Math.random() * (inventoryCoordY - 1366) + 1366 - 250;
- game.addChild(enemy);
- bringForwardVCR();
- }, Math.random() * 6000); // Random interval within 6 seconds
- }
- // Instantiate arrowRight only after the even is done at room5state.arrowRightX and room5state.arrowRightY
- LK.setTimeout(function () {
- var arrowRight = LK.getAsset('bg_ArrowRight', {
- anchorX: 0.5,
- anchorY: 0.5,
- x: room5State.arrowRightX,
- y: room5State.arrowRightY
- });
- game.addChild(arrowRight);
- levelObjs.push(arrowRight);
- animateUpDown(arrowRight, 20, 1000);
- arrowRight.down = function (x, y, obj) {
- exitRoom5();
- LK.getSound('s_Footsteps').play();
- room3();
- };
- room5State.is_attack_done = true;
- // Instantiate krampushalfA at room5state keyX and keyY after enemy spawning
- var krampusHalfA = LK.getAsset('bg_KrampusHalfKey_A', {
- anchorX: 0.5,
- anchorY: 0.5,
- x: room5State.keyX,
- y: room5State.keyY,
- alpha: 0
- });
- game.addChild(krampusHalfA);
- fadeInObj(krampusHalfA, 1000);
- bringForwardVCR();
- LK.getSound('s_Appear').play();
- // Create particles effect
- for (var i = 0; i < 20; i++) {
- var offsetX = Math.random() * 100 - 50; // Random offset between -50 and 50
- var offsetY = Math.random() * 100 - 100; // Random offset between -50 and 50
- var particles = LK.getAsset('bg_Snowflake', {
- anchorX: 0.5,
- anchorY: 0.5,
- x: room5State.keyX + offsetX,
- y: room5State.keyY + offsetY,
- alpha: 1
- });
- game.addChild(particles);
- tween(particles, {
- alpha: 0
- }, {
- duration: 3000,
- onFinish: function onFinish() {
- particles.destroy();
- }
- });
- }
- addCollidableObjects(krampusHalfA, 'bg_KrampusHalfKey_A');
- // Add interaction to krampusHalfA
- krampusHalfA.down = function (x, y, obj) {
- if (addItemToInventory('bg_KrampusHalfKey_A')) {
- krampusHalfA.destroy(); // Destroy krampusHalfA
- // Add to inventory
- room5State.is_key_found = true; // Update room5state
- LK.getSound('s_GetItem').play(); // Play sound
- bringForwardVCR();
- }
- };
- }, 8000);
}
//ensure that if we are entering the room after the attack but the key was not picked up then it can be taken.
if (room5State.is_attack_done) {
if (!room5State.is_key_found) {
@@ -2464,8 +2389,10 @@
//----------------------------------------------------------------------------------------------------
//the update function and the game flow
//----------------------------------------------------------------------------------------------------
//the game update function that looks at the state of the game.
+var enemyMax = Math.floor(Math.random() * 6) + 10; // Random number between 10 and 15
+var enemyCount = 0;
game.update = function () {
// Create a new snowflake every 90 ticks only if the main menu is on
if (is_mainMenu) {
// Play either s_manscream01, s_manscream02, s_womanscream01, s_womanscream02 every 10 to 20 seconds
@@ -2752,8 +2679,87 @@
};
levelObjs.push(krampusHalfB_item);
}
}
+ if (is_room5) {
+ if (!room5State.is_attack_done && !is_gameover) {
+ if (LK.ticks % 90 == 0 || LK.ticks % 60 == 0) {
+ if (enemyCount < enemyMax) {
+ var enemyType = Math.random() < 0.5 ? 'bg_Doll01' : 'bg_Doll02';
+ var enemy = new Enemy(enemyType);
+ enemy.x = Math.random() * 2048;
+ enemy.y = Math.random() * (inventoryCoordY - 1366) + 1366 - 250;
+ game.addChild(enemy);
+ bringForwardVCR();
+ enemyCount++;
+ //if we are now at enemyCount16 it means the attack is now done.
+ if (enemyCount == enemyMax) {
+ room5State.is_attack_done = true;
+ LK.setTimeout(function () {
+ var arrowRight = LK.getAsset('bg_ArrowRight', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: room5State.arrowRightX,
+ y: room5State.arrowRightY
+ });
+ game.addChild(arrowRight);
+ levelObjs.push(arrowRight);
+ animateUpDown(arrowRight, 20, 1000);
+ arrowRight.down = function (x, y, obj) {
+ exitRoom5();
+ LK.getSound('s_Footsteps').play();
+ room3();
+ };
+ // Instantiate krampushalfA at room5state keyX and keyY after enemy spawning
+ var krampusHalfA = LK.getAsset('bg_KrampusHalfKey_A', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: room5State.keyX,
+ y: room5State.keyY,
+ alpha: 0
+ });
+ game.addChild(krampusHalfA);
+ fadeInObj(krampusHalfA, 1000);
+ bringForwardVCR();
+ LK.getSound('s_Appear').play();
+ // Create particles effect
+ for (var i = 0; i < 20; i++) {
+ var offsetX = Math.random() * 100 - 50; // Random offset between -50 and 50
+ var offsetY = Math.random() * 100 - 100; // Random offset between -50 and 50
+ var particles = LK.getAsset('bg_Snowflake', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: room5State.keyX + offsetX,
+ y: room5State.keyY + offsetY,
+ alpha: 1
+ });
+ game.addChild(particles);
+ tween(particles, {
+ alpha: 0
+ }, {
+ duration: 3000,
+ onFinish: function onFinish() {
+ particles.destroy();
+ }
+ });
+ }
+ addCollidableObjects(krampusHalfA, 'bg_KrampusHalfKey_A');
+ // Add interaction to krampusHalfA
+ krampusHalfA.down = function (x, y, obj) {
+ if (addItemToInventory('bg_KrampusHalfKey_A')) {
+ krampusHalfA.destroy(); // Destroy krampusHalfA
+ // Add to inventory
+ room5State.is_key_found = true; // Update room5state
+ LK.getSound('s_GetItem').play(); // Play sound
+ bringForwardVCR();
+ }
+ };
+ }, 2000); //end of the set timeout
+ }
+ }
+ }
+ }
+ }
if (is_flickerState) {
// If the state is true, set the alpha to 0.5
eyeFlash.alpha = 0.20;
} else {
Eerie Christmas-inspired toy shop The only text on screen should be the title "Krampus Lockdown" centered on the image.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a single cartoon snowflake. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a simple eerie christmas blank dirty ripped paper. Use christmas colors. Do not put text, just the dirty ripped paper so i can fill it myself with text. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. No text.
A heavily grainy screen filled with analog noise, washed-out colors, subtle scratches on the film, and a worn, nostalgic texture.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
horizontal scan lines, slightly distorted colors, subtle static noise, and faint glow around edges.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
bloody christmas elf glove tapping at screen clipart. Just the glove. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
the number 13 written in black. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
black gothic frame with a question mark inside silhouette. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a simple dirty, dark and eerie Christmas clown key. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
the number 28 written in black, make the numbers eerie. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
the number 7 written in black, make the numbers eerie. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
the number 0 written in black, make the numbers eerie. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Eerie Christmas-inspired room similar to a resident evil room Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Eerie Christmas-inspired bathroom similar to a resident evil room Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a cartoon envelope with an toy elf on it holding a questionmark. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a simple dirty, dark and eerie Christmas bathroom key. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
eerie christmas inspired krampus lock with a resident evil style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
eerie christmas inspired button as an arrow pointing right that says SKIP in a creepy font png. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Eerie Christmas-inspired garage similar to a resident evil room Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a simple fuse inspired from a resident evil puzzle graphics Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
an eerie wall fusebox Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Eerie Christmas-inspired hallway similar to a resident evil room Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
eerie creepy old rusty key with krampus face embossed on it png. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a simple dirty, dark and eerie Christmas bathroom key. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
eerie christmas inspired mistletoe lock with a resident evil style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
eerie christmas inspired tree lock with a resident evil style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a simple dirty, dark and eerie Christmas light key. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
eerie christmas inspired christmas light lock with a resident evil style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
eerie christmas inspired lump of coal with a resident evil style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Eerie flame similar to a resident evil asset, realistic Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Eerie Christmas-inspired krampus statuette similar to a resident evil asset Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a simple eerie christmas blank dirty letter envelope. Use christmas colors. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. No text.
Eerie Christmas-inspired crypt room similar to a resident evil room Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a simple dark red cartoon christmas hat Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. No text.
cartoon mulled wine. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
cartoon christmas inspired question mark Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
krampus with a christmas hat coin embossed on it png. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
mulled wine coin embossed on it png. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Eerie Christmas-inspired krampus doll sitting similar to a resident evil Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
old safe png grey with four buttons on the side. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
s_KrampusLaugh01
Sound effect
s_SplashScreen
Sound effect
s_KrampusLaugh02
Sound effect
s_WomanScream01
Sound effect
s_ManScream01
Sound effect
s_ManScream02
Sound effect
s_WomanScream02
Sound effect
s_LightBuzz
Sound effect
s_ShutdownSound
Sound effect
s_CrumpledPaper
Sound effect
s_Bathroom
Sound effect
s_GameOver
Sound effect
s_CartoonRun
Sound effect
s_GetItem
Sound effect
s_KrampusScream
Sound effect
s_UnlockSound
Sound effect
s_WindBlow
Sound effect
s_FuseBoxOn
Sound effect
s_GeneratorSound
Sound effect
s_Locked
Sound effect
s_Interior
Sound effect
s_DollDeath
Sound effect
s_Footsteps
Sound effect
s_DollLaugh01
Sound effect
s_DollLaugh02
Sound effect
s_DollDeath01
Sound effect
s_DollDeath02
Sound effect
s_EncounterMusic
Sound effect
s_FirstDollMusic
Sound effect
s_ChristmasMusic
Sound effect
s_BreakingSound
Sound effect
s_Collected
Sound effect
s_Extinguished
Sound effect
s_Appear
Sound effect
s_MulledWine
Sound effect
s_Slurping
Sound effect
s_SafeUnlocked
Sound effect
s_LockedSafe
Sound effect