Downloads containing 1st lvl of 2025.j2as

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: Diam Mountain duo-pack... jjturbo9 Single player 5.6 Download file

File preview

//Sugar rush counter
bool onDrawLives(jjPLAYER@ player, jjCANVAS@ screen) {
    screen.drawSprite(590, 45, ANIM::PICKUPS, 1, jjGameTicks>>2, -1, SPRITE::NORMAL);
    screen.drawSprite(580, 30, ANIM::PICKUPS, 13, jjGameTicks>>2, -1, SPRITE::NORMAL);
    screen.drawString(570, 15, "SUGAR RUSH", STRING::SMALL, STRING::PALSHIFT, 16);
    screen.drawString(600, 35, formatInt(player.food%100, "1") + " / 100", STRING::MEDIUM, STRING::PALSHIFT, 16);
    return false;
}
//Sound effect for getting key
void onFunction100(jjPLAYER@ player) {
  if (!jjTriggers[21]) {
    jjTriggers[21] = true;
    keyGot = true; // NEW LINE
    jjSample(player.xPos, player.yPos, SOUND::MENUSOUNDS_TYPEENTER);
  }
}
//Door opening only if you have the key and go to the door block after + sound
void onFunction101(jjPLAYER@ player) {
  if (!jjTriggers[24])
  if (jjTriggers[21]) {
    jjTriggers[24] = true;
    keyGot = false; // NEW LINE
    jjSample(player.xPos, player.yPos, SOUND::COMMON_MONITOR);
  }
}

//Sound effect for getting 2nd key
void onFunction102(jjPLAYER@ player) {
  if (!jjTriggers[28]) {
    jjTriggers[28] = true;
    keyGot = true; // NEW LINE
    jjSample(player.xPos, player.yPos, SOUND::MENUSOUNDS_TYPEENTER);
  }
}
//2nd door block opening only if you have the key and go to the door after + sound
void onFunction103(jjPLAYER@ player) {
  if (!jjTriggers[26])
  if (jjTriggers[28]) {
    jjTriggers[26] = true;
    keyGot = false; // NEW LINE
    jjSample(player.xPos, player.yPos, SOUND::COMMON_MONITOR);
  }
}

//key appearing and disappearing on player
bool keyGot = false;
void onPlayer(jjPLAYER@ player) {
	if (keyGot) {
		jjDrawTile(player.xPos - (player.direction > 0 ? 4 : 28), player.yPos - 8, 856 | (player.direction > 0 ? TILE::HFLIPPED : 0), TILE::ALLQUADRANTS, 4);
	}
}