Downloads containing hgfMedivoTimes.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

#include "Jazz1Enemies v04.asc"
int gemCount = 9999;
void onLevelLoad()
{
 jjObjectPresets[OBJECT::SPIKEBOLL].bulletHandling = HANDLING::DESTROYBULLET;
 Jazz1::MakeEnemy(OBJECT::NORMTURTLE, Jazz1::Enemies::Diamondus_TurtleGoon, true, 1.2f, Resize::Method::Scale2xSAI).SetDirection(Jazz1::Directions::Random);
 Jazz1::MakeEnemy(OBJECT::HELMUT, Jazz1::Enemies::Medivo_Helmut, true, 1.2f, Resize::Method::Scale2xSAI).SetDirection(Jazz1::Directions::Random).SetWalkingEnemyCliffReaction(Jazz1::TurnAround).SetSpeed(1.5+(jjDifficulty*0.5));
 Jazz1::MakeEnemy(OBJECT::RAPIER, Jazz1::Enemies::Medivo_GhostRapierVertical, true, 1.5f, Resize::Method::Scale2xSAI).SetSpeed(1+(jjDifficulty*1.5));
 //make purple gems never de-activate
 jjObjectPresets[OBJECT::PURPLEGEM].deactivates = false;
 //count gems
 gemCount = 0;
 for(int x = 0; x <= jjLayerWidth[4]; ++x)
 {
  for(int y = 0; y <= jjLayerHeight[4]; y++)
  {
   if(jjEventGet(x, y) == OBJECT::PURPLEGEM)
   {
    gemCount += 1;
   }
  }
 }
}

bool gemClearDisplayed = false;
void onMain()
{
 if (p.gems[GEM::PURPLE] >= gemCount && gemClearDisplayed == false)
 {
  gemClearDisplayed = true;
  jjNxt();
 }
}

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::PURPLEGEM && o.isActive && gemDistance < nearestGem)
  {
   nearestGem = gemDistance;
   closestGemX = o.xPos;
   closestGemY = o.yPos;
  }
 }
 if(nearestGem < 999999999 && jjDifficulty < 2)
 {
  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, 56, 2, 4);
 }
}

bool onDrawLives(jjPLAYER@ p, jjCANVAS@ canvas)
{
 p.lives = 9;
 return true;
}