Downloads containing hgfRabbitsDontStink.j2as

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: Operation Cleanup: Turtle...Featured Download happygreenfrog Single player 8.2 Download file

File preview

#pragma require "hgfDiamondusColosseum.j2l"
#include "Jazz1Enemies v04.asc"

void onLevelLoad()
{
 //select enemies
 Jazz1::MakeEnemy(OBJECT::NORMTURTLE, Jazz1::Enemies::Diamondus_TurtleGoon, true, 1.2f, Resize::Method::Scale2xSAI).SetDirection(Jazz1::Directions::FaceJazz);
 Jazz1::MakeEnemy(OBJECT::BEE, Jazz1::Enemies::Diamondus_BumblingBee, true, 1.3f, Resize::Method::Scale2xSAI);
 Jazz1::MakeEnemy(OBJECT::SPARK, Jazz1::Enemies::Tubelectric_Spark, true, 1.5f, Resize::Method::Scale2xSAI);
 //set destruct terrain to never deactivate
 jjObjectPresets[OBJECT::DESTRUCTSCENERY].deactivates = false;
}

bool jjWin = false;
void onMain()
{
 if(jjTileGet(4, 93, 53) == 177 && jjTileGet(4, 16, 47) == 172  && jjTileGet(4, 179, 21) == 172 && !jjWin)
 {
  jjNxt();
  jjWin = true;
 }
}

bool thisCodeStinks = false;
void onPlayer(jjPLAYER@ p)
{
 int nearestGem = 999999999;
 float closestGemX = 0;
 float closestGemY = 0;
 float angleToGemRad = 0;
 float angleToGem = 0;
 for(int i = 0; i < jjObjectCount; i++)
 {
  jjOBJ@ o = jjObjects[i];
  int gemDistance = int(sqrt(((o.xPos-p.xPos)**2)+((o.yPos-p.yPos)**2)));
  if(o.eventID == OBJECT::DESTRUCTSCENERY && o.state != STATE::DONE && o.isActive && gemDistance < nearestGem)
  {
   nearestGem = gemDistance;
   closestGemX = o.xPos;
   closestGemY = o.yPos;
  }
 }
 if(nearestGem < 999999999 && jjDifficulty < 2 && !thisCodeStinks)
 {
  angleToGemRad = atan2(p.xPos - closestGemX, p.yPos-closestGemY);
  angleToGem = angleToGemRad*162.89;
  jjDrawRotatedSprite(p.xPos+(sin(angleToGemRad+3.14)*48), p.yPos+(cos(angleToGemRad+3.14)*48), ANIM::FLAG, 0, 0, int(angleToGem)+200, 1, 1, SPRITE::TRANSLUCENTPALSHIFT, 40, 2, 4);
 }
}

//infinite lives, render enemies remaining to screen
bool onDrawLives(jjPLAYER@ p, jjCANVAS@ canvas)
{
 p.lives = 9;
 return true;
}