Code edit (4 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: asset is not defined' in or related to this line: 'safeText.x = asset.x;' Line Number: 1740
Code edit (2 edits merged)
Please save this source code
User prompt
how would you the rotation to be 45degrees on an asset
Code edit (3 edits merged)
Please save this source code
User prompt
create a function to rotate an asset 90 degrees to the left
Code edit (2 edits merged)
Please save this source code
User prompt
make the text in defaultDownLoreNote black
Code edit (1 edits merged)
Please save this source code
Code edit (3 edits merged)
Please save this source code
User prompt
make gameOverTextSequence in secret ending with black outline
Code edit (1 edits merged)
Please save this source code
Code edit (12 edits merged)
Please save this source code
User prompt
display details text after the last gameovertextsequence has displayed
Code edit (2 edits merged)
Please save this source code
User prompt
in secretending fadein bg_room7
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Timeout.tick error: tween is not defined' in or related to this line: 'tween(textObject, {' Line Number: 996 ↪💡 Consider importing and using the following plugins: @upit/tween.v1
Code edit (3 edits merged)
Please save this source code
User prompt
Iterate over game.children and destroy all except grain and scanlines
User prompt
in secretending() delete everything in the game except the vcr effect
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: frame is not defined' in or related to this line: 'var questionMark = LK.getAsset('SE_QuestionMark', {' Line Number: 2344
Code edit (1 edits merged)
Please save this source code
User prompt
in the update function, when room4state.is_medallionA and room4state.is_medallionB instantiate the se_questionmark, move up and down and onclick should trigger room7
===================================================================
--- original.js
+++ change.js
@@ -193,8 +193,43 @@
}, 2000);
// Destroy the collectible after pickup
asset.destroy();
}
+//put the default behaviour here
+function defaultDownLoreTextBehaviour(text) {
+ // Instantiate help icon in the center of the playspace
+ helpIcon = game.addChildAt(LK.getAsset('bg_HelpMenu', {
+ 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(text, {
+ size: 100,
+ fill: 0xFF0000,
+ font: "Garamond",
+ align: "center" // Ensure text alignment is set
+ });
+ helpText.anchor.set(0.5, 1);
+ helpText.x = helpIcon.x + 50; // Center helpText on helpIcon
+ helpText.y = helpIcon.y + 500; // Position helpText below helpIcon
+ game.addChildAt(helpText, game.children.indexOf(grain) - 1);
+ // Play crumpled paper sound
+ LK.getSound('s_CrumpledPaper').play();
+ // Set help icon as active
+ isHelpIconActive = true;
+}
+function defaultUpLoreTextBehaviour() {
+ if (isHelpIconActive && helpIcon) {
+ helpIcon.destroy();
+ if (helpText) {
+ helpText.destroy();
+ }
+ LK.getSound('s_CrumpledPaper').play();
+ isHelpIconActive = false;
+ }
+}
// Create and display the collectible counter at the top right of the screen
var collectibleCounterText;
// Update the collectible counter text whenever the collectibleCounter changes
// Ensure this function is called in the Collectible class where the counter is incremented
@@ -360,10 +395,13 @@
var lastPosition = {
x: 0,
y: 0
};
-var sequence = [7, 28];
-var enteredSequence = [];
+var safeStatus = {
+ is_note1_found: false,
+ is_note2_found: false,
+ is_note3_found: false
+};
var collectibleCounter = 0;
var maxCollectibles = 7;
var movementCheckInterval;
var inventoryCoordinateLeftX = 2048 / 2 - 780; //2048 / 2 - 500;
@@ -389,9 +427,11 @@
var is_room3 = false;
var is_room4 = false;
var is_room5 = false;
var is_room6 = false;
-var room6State = {};
+var loreNote1 = "He is real… \n HE IS REAL! \nThe Krampus… \nHe is not only a legend! \nWhy did I not believe \nthe people in the \ntown when I visited\n on November 28th…";
+var loreNote2 = "I thought it would be fun \n to dress up as Santa and\n prank children. \nWhat is the harm? \nSanta and Krampus \ndon’t exist anyway…";
+var loreNote3 = "Two days after Krampuslauf \nI was still nursing my injuries… \nI should not have done anything to \nbe on the naughty list… ";
var room5State = {
is_key_found: false,
is_event_done: false,
is_gameover: false,
@@ -441,9 +481,8 @@
candle5_x: 2048 / 2,
candle5_y: 2732 / 2 + 400,
collectibleX: 1775,
collectibleY: 1915,
- //2400,
dollkeyX: 2048 / 2 + 900,
dollkeyY: 2732 / 2 - 200,
krampusHalfX: 2048 / 2,
krampusHalfY: 2732 / 2 + 600,
@@ -469,9 +508,11 @@
keyY: 1900,
arrowRightX: 1500,
arrowRightY: 1500,
medallionX: 2048 / 2 + 40,
- medallionY: 525
+ medallionY: 525,
+ loreNoteX: 2048 / 2 + 500,
+ loreNoteY: 1600
};
var room2State = {
// is_unlocked: false,
is_fusebox_fixed: false,
@@ -502,9 +543,11 @@
fusebox_redX: 650,
fusebox_redY: 975,
fusebox_greenX: 675,
fusebox_greenY: 975,
- fuseboxRed: null
+ fuseboxRed: null,
+ loreNoteX: 2048 / 2,
+ loreNoteY: 2732 / 2 + 400
};
var room1State = {
is_unlocked: false,
is_collectible_found: false,
@@ -1000,18 +1043,8 @@
x: 2048 / 2 - 100,
y: 2732 / 2
}));
// Instantiate bg_DarkNumber in the center of the playspace
- var clownkey = game.addChild(LK.getAsset('bg_ClownKey', {
- anchorX: 0.5,
- anchorY: 0.5,
- x: 2048 / 2,
- y: 2732 / 2
- }));
- clownkey.down = function (x, y, obj) {
- secretEnding();
- };
- // Instantiate bg_DarkNumber in the center of the playspace
var darkNumber = game.addChild(LK.getAsset('bg_DarkNumber', {
anchorX: 0.5,
anchorY: 0.5,
x: 2048 / 2 - 700,
@@ -1618,8 +1651,23 @@
});
game.addChild(fusebox);
levelObjs.push(fusebox);
addCollidableObjects(fusebox, 'bg_FuseBox');
+ var loreNote = LK.getAsset('s_DirtyLetter', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: room2State.loreNoteX,
+ y: room2State.loreNoteY
+ });
+ game.addChild(loreNote);
+ levelObjs.push(loreNote);
+ loreNote.down = function (x, y, obj) {
+ defaultDownLoreTextBehaviour(loreNote1);
+ safeStatus.is_note1_found = true;
+ };
+ loreNote.up = function (x, y, obj) {
+ defaultUpLoreTextBehaviour();
+ };
if (!room2State.is_collectible_found) {
var collectible = new Collectible();
collectible.x = room2State.collectibleX;
collectible.y = room2State.collectibleY;
@@ -1883,8 +1931,29 @@
shakeAsset(krampusLock);
};
addCollidableObjects(krampusLock, 'bg_KrampusLock');
}
+ //we instantiate the arrow
+ else {
+ var arrow = LK.getAsset('bg_ArrowUp', {
+ anchoseX: 0.5,
+ anchorY: 0.5,
+ x: room3State.lockKrampusX,
+ y: room3State.lockKrampusY,
+ alpha: 0
+ });
+ fadeInObj(arrow, 3000);
+ game.addChild(arrow);
+ animateUpDown(arrow, 20, 1000);
+ levelObjs.push(arrow);
+ arrow.down = function (x, y, obj) {
+ LK.getSound('s_Footsteps').play();
+ stopSoundInterval();
+ exitRoom3();
+ room6();
+ arrow.destroy();
+ };
+ }
//creepy doll lock
if (!room3State.is_lockDoll_unlocked) {
var creepyDollLock = LK.getAsset('bg_DollLock', {
anchorX: 0.5,
@@ -2098,9 +2167,23 @@
// Fade in the breakable object over 3 seconds
fadeInObj(breakable, 3000);
}
//add the medallion
- if (!room5State.is_medallion_found) {
+ //if we don't have all the notes then we want to have the safe to be there
+ if (!safeStatus.is_note1_found && !safeStatus.is_note2_found && !safeStatus.is_note3_found) {
+ var safe = LK.getAsset('bg_Safe', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: room5State.medallionX,
+ y: room5State.medallionY,
+ alpha: 0
+ });
+ levelObjs.push(safe);
+ game.addChild(safe);
+ fadeInObj(safe, 3000);
+ }
+ //if we have the safe unlocked but the medallion has not been picked up yet
+ else if (!room5State.is_medallion_found) {
var medallionB = LK.getAsset('SE_MedallionB', {
anchorX: 0.5,
anchorY: 0.5,
x: room5State.medallionX,
@@ -2458,9 +2541,9 @@
// Add bathroomKeyItem to the inventory
if (!addItemToInventory('bg_KrampusHalfKey_B')) {
console.log("Failed to add krampus Key Item to inventory.");
} else {
- // krampushalfB the dollKey when clicked
+ room4State.is_possible_pick_up = false;
krampushalfB.destroy();
// Play s_GetItem sound
LK.getSound('s_GetItem').play();
}
@@ -2492,8 +2575,9 @@
duration: time
});
}
function secretEnding() {
+ pauseClock();
// Destroy all game elements except the VCR effect
// Iterate over game.children and destroy all except grain and scanlines
for (var i = game.children.length - 1; i >= 0; i--) {
var child = game.children[i];
@@ -2520,26 +2604,25 @@
anchorX: 0.5,
anchorY: 0.5,
x: 2048 / 2,
y: 2732 / 2 + 1000,
- alpha: 0
+ alpha: 1
}));
- fadeInObj(krampus, 3000);
var krampusMulledWine = game.addChild(LK.getAsset('s_MulledWine', {
anchorX: 0.5,
anchorY: 0.5,
x: 2048 / 2 + 600,
- y: 2732 / 2 + 1300,
- alpha: 0
+ y: 2732 / 2 + 1200,
+ alpha: 0.75
}));
- fadeInObjWithAlpha(krampusMulledWine, 3000, 0.75);
+ LK.getSound("s_Slurping").play;
var gameOverText = new Text2("", {
size: 150,
fill: 0xFF0000,
stroke: 0x000000,
strokeThickness: 20,
//{mD} // Increased stroke thickness for a more prominent outline
- font: "Garamond",
+ font: "bold Garamond",
align: "center"
});
var endTime = {
hours: clock.hours,
@@ -2583,9 +2666,9 @@
anchorY: 0.5,
scaleX: 1.5,
scaleY: 1.5,
x: 2048 / 2,
- y: 2732 / 2 + 600
+ y: 2732 / 2 + 900
}));
bringForwardVCR();
// Shake Krampus at the end of the gameOver function
shakeAsset(playerMulledWine);
@@ -2741,8 +2824,9 @@
var arrow = unlockLock(krampusKeyItem, krampusLock, "bg_KrampusLock", 'bg_ArrowUp', krampusLock.x, krampusLock.y);
room3State.is_lockKrampus_unlocked = true;
game.addChild(arrow);
animateUpDown(arrow, 20, 1000);
+ levelObjs.push(arrow);
arrow.down = function (x, y, obj) {
LK.getSound('s_Footsteps').play();
stopSoundInterval();
exitRoom3();
@@ -2811,8 +2895,9 @@
x: room4State.medallionAX + offsetX,
y: room4State.medallionAY + offsetY,
alpha: 1
});
+ levelObjs.push(particles);
game.addChild(particles);
tween(particles, {
alpha: 0
}, {
@@ -2852,8 +2937,9 @@
x: room4State.medallionBX + offsetX,
y: room4State.medallionBY + offsetY,
alpha: 1
});
+ levelObjs.push(particles);
game.addChild(particles);
tween(particles, {
alpha: 0
}, {
@@ -2979,8 +3065,9 @@
x: room4State.krampusHalfX + offsetX,
y: room4State.krampusHalfY + offsetY,
alpha: 1
});
+ levelObjs.push(particles);
game.addChild(particles);
tween(particles, {
alpha: 0
}, {
@@ -2994,8 +3081,9 @@
// Add bathroomKeyItem to the inventory
if (!addItemToInventory('bg_KrampusHalfKey_B')) {
console.log("Failed to add Doll Key Item to inventory.");
} else {
+ room4State.is_possible_pick_up = false;
// Destroy the dollKey when clicked
krampusHalfB_item.destroy();
// Play s_GetItem sound
LK.getSound('s_GetItem').play();
@@ -3058,8 +3146,9 @@
x: room5State.keyX + offsetX,
y: room5State.keyY + offsetY,
alpha: 1
});
+ levelObjs.push(particles);
game.addChild(particles);
tween(particles, {
alpha: 0
}, {
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