Name | Author | Game Mode | Rating | |||||
---|---|---|---|---|---|---|---|---|
Operation Cleanup: Turtle... | happygreenfrog | Single player | 8.2 |
#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;
}
Jazz2Online © 1999-INFINITY (Site Credits). We have a Privacy Policy. Jazz Jackrabbit, Jazz Jackrabbit 2, Jazz Jackrabbit Advance and all related trademarks and media are ™ and © Epic Games. Lori Jackrabbit is © Dean Dodrill. J2O development powered by Loops of Fury and Chemical Beats.
Eat your lima beans, Johnny.