Name | Author | Game Mode | Rating | |||||
---|---|---|---|---|---|---|---|---|
Rocket Flight | szmol96 | Mutator | 9.4 |
#pragma name "Rocket Flight"
#pragma require "flight.j2a"
/**Rocket Flight**/
/**Author: szmol96**/
int fuel = 140; //Time left for flying. Set this together with fuelMax.
const int fuelMax = 140; //How long the player is able to fly. Currently set to 2 seconds.(140/70=2)
bool jumpHeld;
bool flying = false;
void onPlayerInput(jjPLAYER@ p) {
if (!jjMaskedHLine(p.xPos - 12, 24, p.yPos + 21) && p.keyJump && !jumpHeld) {
flying = true;
}
if (p.keyJump && fuel > 0 && flying) {
p.ySpeed = p.ySpeed - .5;
fuel--;
if (jjGameTicks% 3 == 0) jjSample(p.xPos, p.yPos, SOUND::BILSBOSS_FIRE, 0, 20000);
jjPARTICLE@ flame1 = jjAddParticle(PARTICLE::FIRE);
if (flame1 !is null) {
flame1.fire.colorStop = 46;
flame1.fire.colorDelta = 2;
flame1.xPos = p.xPos;
flame1.yPos = p.yPos + 25;
flame1.ySpeed = 1.5;
}
jjPARTICLE@ flame2 = jjAddParticle(PARTICLE::FIRE);
if (flame2 !is null) {
flame2.fire.colorStop = 46;
flame2.fire.colorDelta = 2;
flame2.xPos = p.xPos - 3;
flame2.yPos = p.yPos + 25;
flame2.ySpeed = 1;
}
jjPARTICLE@ flame3 = jjAddParticle(PARTICLE::FIRE);
if (flame3 !is null) {
flame3.fire.colorStop = 46;
flame3.fire.colorDelta = 2;
flame3.xPos = p.xPos + 3;
flame3.yPos = p.yPos + 25;
flame3.ySpeed = 1;
}
jjPARTICLE@ flame4 = jjAddParticle(PARTICLE::FIRE);
if (flame4 !is null) {
flame4.fire.colorStop = 46;
flame4.fire.colorDelta = 2;
flame4.xPos = p.xPos + 6;
flame4.yPos = p.yPos + 25;
flame4.ySpeed = .5;
}
jjPARTICLE@ flame5 = jjAddParticle(PARTICLE::FIRE);
if (flame5 !is null) {
flame5.fire.colorStop = 46;
flame5.fire.colorDelta = 2;
flame5.xPos = p.xPos - 6;
flame5.yPos = p.yPos + 25;
flame5.ySpeed = .5;
}
}
jumpHeld = p.keyJump;
}
void onPlayer(jjPLAYER@ p) {
jjCharacters[CHAR::JAZZ].airJump = AIR::NONE;
jjCharacters[CHAR::SPAZ].airJump = AIR::NONE;
jjCharacters[CHAR::LORI].airJump = AIR::NONE;
if (jjMaskedHLine(p.xPos - 12, 24, p.yPos + 21)) {
fuel = fuelMax;
flying = false;
}
}
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.