Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught Error: The supplied DisplayObject must be a child of the caller' in or related to this line: 'game.setChildIndex(clockText, game.children.length - 1);' Line Number: 504
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught Error: The supplied DisplayObject must be a child of the caller' in or related to this line: 'game.setChildIndex(clockText, game.children.length - 1);' Line Number: 504
Code edit (3 edits merged)
Please save this source code
User prompt
on skipbutton.down do a fadeout when using level1()
Code edit (1 edits merged)
Please save this source code
User prompt
MAKE SURE THAT THE CLOCK IS NOT FADING OUT WHEN USING LEVEL1() AND THAT IS_LEVEL1_UNLOCKED = TRUE
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: bathroomArrow is not defined' in or related to this line: 'game.addChild(bathroomArrow);' Line Number: 1145
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'x')' in or related to this line: 'var arrowRight = LK.getAsset('bg_ArrowRight', {' Line Number: 1139
Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
User prompt
ensure that all actions in level1() happen after the fadein of bg_room1
Code edit (4 edits merged)
Please save this source code
User prompt
in level1() fade in the bg_room1
User prompt
Please fix the bug: 'Uncaught Error: The supplied DisplayObject must be a child of the caller' in or related to this line: 'game.setChildIndex(clockText, game.children.length - 1);' Line Number: 504
Code edit (10 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'tween(elfEnvelope, {' Line Number: 1147
Code edit (2 edits merged)
Please save this source code
User prompt
End the game after 4 seconds but right before that flash the screne red
User prompt
before lk.showgameover LK.effects.flashScreen(0xFF0000, 500);
Code edit (1 edits merged)
Please save this source code
User prompt
add a red screen flash before triggering gameover
===================================================================
--- original.js
+++ change.js
@@ -1004,8 +1004,22 @@
onFinish: function onFinish() {
LK.playMusic('s_Bathroom', {
loop: true
});
+ // Variable to track if help icon is active
+ var isHelpIconActive = false;
+ var helpIcon = null;
+ var helpText = null;
+ //fade in bg_Room01
+ var room01 = LK.getAsset('bg_Room01', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: 2048 / 2,
+ y: 2732 / 2,
+ alpha: 0
+ });
+ game.addChild(room01);
+ levelObjs.push(room01);
// Start the clock
startClock();
var elfEnvelope = LK.getAsset('bg_ElfEnvelope01', {
anchorX: 0.5,
@@ -1169,203 +1183,24 @@
});
game.addChild(inventoryUI1);
game.addChild(inventoryUI2);
}
+ // // Instantiate bg_ClownKey in the center of the playspace
+ // var clownKey = LK.getAsset('bg_ClownKey', {
+ // anchorX: 0.5,
+ // anchorY: 0.5,
+ // x: 2048 / 2,
+ // y: 2732 / 2
+ // });
+ // game.addChild(clownKey);
+ // clownKey.down = function (x, y, obj) {
+ // gameOver();
+ // };
+ // Ensure bg_Grain and bg_ScanLines are always on the top layer
+ // Instantiate bg_ElfEnvelope01 in the center of the playspace
+ bringForwardVCR();
}
});
- // Variable to track if help icon is active
- var isHelpIconActive = false;
- var helpIcon = null;
- var helpText = null;
- //fade in bg_Room01
- var room01 = LK.getAsset('bg_Room01', {
- anchorX: 0.5,
- anchorY: 0.5,
- x: 2048 / 2,
- y: 2732 / 2,
- alpha: 0
- });
- game.addChild(room01);
- levelObjs.push(room01);
- // Start the clock
- startClock();
- var elfEnvelope = LK.getAsset('bg_ElfEnvelope01', {
- anchorX: 0.5,
- anchorY: 0.5,
- x: 2048 / 2 - 525,
- y: 2732 / 2 + 550,
- alpha: 0
- });
- game.addChild(elfEnvelope);
- levelObjs.push(elfEnvelope);
- // Add event listener for elf envelope
- elfEnvelope.down = function (x, y, obj) {
- if (!isHelpIconActive) {
- // Instantiate help icon in the center of the playspace
- helpIcon = game.addChildAt(LK.getAsset('bg_HelpIcon01', {
- anchorX: 0.5,
- anchorY: 0.5,
- x: 2048 / 2,
- y: 2732 / 2
- }), game.children.indexOf(grain) - 1);
- // Create red text above the help icon
- helpText = new Text2("Tutorial: \n \n To escape the room, \n collect the key and \n use it on the lock. ", {
- size: 100,
- fill: 0xFF0000,
- font: "Garamond",
- align: "center" // Ensure text alignment is set
- });
- helpText.anchor.set(0.5, 1);
- helpText.x = 2048 / 2;
- helpText.y = 2732 / 2 + 125;
- game.addChildAt(helpText, game.children.indexOf(grain) - 1);
- // Play crumpled paper sound
- LK.getSound('s_CrumpledPaper').play();
- // Set help icon as active
- isHelpIconActive = true;
- }
- };
- // Add event listener to destroy help icon and help text when screen is tapped
- game.down = function (x, y, obj) {
- if (isHelpIconActive && helpIcon) {
- helpIcon.destroy();
- if (helpText) {
- helpText.destroy();
- }
- LK.getSound('s_CrumpledPaper').play();
- isHelpIconActive = false;
- }
- };
- if (is_level1_unlocked) {
- LK.playMusic('s_Bathroom', {
- loop: true
- });
- bringForwardClock();
- bringForwardInventory();
- } else {
- // Create and display the clock text at the top center of the screen
- clockText = new Text2("", {
- size: 100,
- fill: 0xFF0000,
- // Red color
- stroke: 0x000000,
- // Black outline
- strokeThickness: 20,
- // Thickness of the outline
- font: "bold Garamond",
- align: "center"
- });
- clockText.anchor.set(0.5, 0);
- clockText.x = 2048 / 2;
- clockText.y = 50;
- game.addChild(clockText);
- // Update the clock text every second
- LK.setInterval(function () {
- clockText.setText(("0" + clock.hours).slice(-2) + ":" + ("0" + clock.minutes).slice(-2) + ":" + ("0" + clock.seconds).slice(-2));
- }, 1000);
- // Instantiate bg_BathroomLock in the middle right of the room 01 playspace
- var bathroomLock = LK.getAsset('bg_BathroomLock', {
- anchorX: 0.5,
- anchorY: 0.5,
- x: 2048 - 150,
- // Positioned towards the right side
- y: 2732 / 2 + 300
- });
- game.addChild(bathroomLock);
- addLock(bathroomLock, 'bg_BathroomLock');
- // Add event listener for bathroomLock
- bathroomLock.down = function (x, y, obj) {
- shakeAsset(bathroomLock);
- };
- levelObjs.push(bathroomLock);
- var bathRoomKey = LK.getAsset('bg_BathRoomKey', {
- anchorX: 0.5,
- anchorY: 0.5,
- x: 2048 / 2 + 325,
- y: 2732 / 2 + 125,
- alpha: 0
- });
- game.addChild(bathRoomKey);
- // Add event listener for bathRoomKey
- bathRoomKey.down = function (x, y, obj) {
- // Add bathroomKeyItem to the inventory
- if (!addItemToInventory('bg_BathroomKeyItem')) {
- console.log("Failed to add Bathroom Key Item to inventory.");
- } else {
- // Destroy the bathRoomKey
- bathRoomKey.destroy();
- // Play s_GetItem sound
- LK.getSound('s_GetItem').play();
- }
- };
- levelObjs.push(bathRoomKey);
- // Instantiate bg_FakeDoll in the bottom middle of the playspace
- fakeDoll = LK.getAsset('bg_FakeDoll', {
- anchorX: 0.5,
- anchorY: 1.0,
- x: 2048 / 2 + 300,
- y: 2732
- });
- game.addChild(fakeDoll);
- levelObjs.push(fakeDoll);
- // Start the wobble movement when room01 is fully visible
- wobbleFakeDoll();
- // Synchronize fade-in for all three elements
- tween(bathRoomKey, {
- alpha: 1
- }, {
- duration: 3000
- });
- if (elfEnvelope) {
- tween(elfEnvelope, {
- alpha: 1
- }, {
- duration: 3000,
- easing: tween.easeInOut
- });
- }
- tween(room01, {
- alpha: 1
- }, {
- duration: 3000,
- onFinish: function onFinish() {
- LK.playMusic('s_Bathroom', {
- loop: true
- });
- }
- });
- // Add inventory UI at the left of the center at the bottom of the screen
- inventoryUI1 = LK.getAsset('bg_InventoryUI', {
- anchorX: 0.5,
- anchorY: 0.5,
- x: inventoryCoordinateLeftX,
- // Position to the left of the center
- y: inventoryCoordY // Position at the bottom of the screen
- });
- inventoryUI2 = LK.getAsset('bg_InventoryUI', {
- anchorX: 0.5,
- anchorY: 0.5,
- x: inventoryCoordinateRightX,
- // Position to the left of the center
- y: inventoryCoordY // Position at the bottom of the screen
- });
- game.addChild(inventoryUI1);
- game.addChild(inventoryUI2);
- }
- // // Instantiate bg_ClownKey in the center of the playspace
- // var clownKey = LK.getAsset('bg_ClownKey', {
- // anchorX: 0.5,
- // anchorY: 0.5,
- // x: 2048 / 2,
- // y: 2732 / 2
- // });
- // game.addChild(clownKey);
- // clownKey.down = function (x, y, obj) {
- // gameOver();
- // };
- // Ensure bg_Grain and bg_ScanLines are always on the top layer
- // Instantiate bg_ElfEnvelope01 in the center of the playspace
- bringForwardVCR();
}
function room2() {
if (is_level1) {
is_level1 = false;
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