Name | Author | Game Mode | Rating | |||||
---|---|---|---|---|---|---|---|---|
Pumpkin Park | Dragusela | Battle | 8 | |||||
Twilight River | Dragusela | Capture the flag | N/A | |||||
Anniversary Bash 26 CTF | Jazz2Online | Capture the flag | N/A | |||||
Anniversary Bash 26 Battle | Jazz2Online | Battle | N/A | |||||
Saline Shores | PurpleJazz | Capture the flag | 9.2 | |||||
Knapweed Bog | Lark | Battle | 8 | |||||
Freeport | Loon | Battle | N/A | |||||
Anniversary Bash 22 levels | Jazz2Online | Multiple | N/A | |||||
Facilis descensus Averno | Loon | Battle | 8.5 | |||||
Custom Weapons... | Violet CLM | Other | 10 |
#pragma require "weaponVMega1.asc"
#include "MLLE-Weapons.asc"
#pragma require "weaponVMega.j2a"
namespace WeaponVMega {
namespace Boomerang {
class Weapon : MLLEWeapons::WeaponInterface {
Weapon() {
super(
regularObjectTemplate: MLLEWeapons::ObjectTemplate(
xSpeed: 6,
xAcc: 0.125,
killAnim: jjAnimSets[ANIM::AMMO].firstAnim + 80,
isBlastable: false,
lightType: LIGHT::POINT2,
counterEnd: 35
),
powerupObjectTemplate: MLLEWeapons::ObjectTemplate(
xSpeed: 7,
xAcc: 0.1875,
killAnim: jjAnimSets[ANIM::AMMO].firstAnim + 80,
isBlastable: false,
lightType: LIGHT::POINT,
counterEnd: 30,
animSpeed: 2
),
animSetFilename: "weaponVMega.j2a",
animSetID: 0,
pickupAnimation: 1,
behavior: function(obj, powerup) { obj.behavior = Behavior; }
);
}
}
void Behavior(jjOBJ@ obj) {
if (obj.state == STATE::START) {
obj.xAcc = (obj.xSpeed + obj.var[7] / 65536.f) * 32;
obj.yAcc = obj.ySpeed * 32;
obj.state = STATE::FLY;
DefaultWeapons::DefaultSample(obj, WEAPON::BLASTER);
}
obj.counter += 8;
const auto lastX = obj.xPos, lastY = obj.yPos;
obj.xPos = obj.xOrg + jjSin(obj.counter) * obj.xAcc;
obj.yPos = obj.yOrg + jjSin(obj.counter) * obj.yAcc;
obj.xSpeed = obj.xPos - lastX; //for GetAngle
obj.ySpeed = obj.yPos - lastY; //
obj.frameID = ((jjGameTicks + obj.objectID) / 3) & 7;
if (obj.frameID >= 4)
obj.frameID = 7 - obj.frameID;
obj.curFrame = jjAnimations[obj.curAnim] + obj.frameID;
if (obj.counter >= 512 || MLLEWeapons::HelpfulBulletFunctions::MaskedPixel(obj) || obj.state == STATE::EXPLODE) {
obj.delete();
if (obj.creatorType == CREATOR::PLAYER) {
const jjPLAYER@ play = jjPlayers[obj.creator];
if (abs(obj.xPos - play.xPos) <= 20 && abs(obj.yPos - play.yPos) <= 20)
return; //inside shooter; no explosion anim needed
}
jjObjects[jjAddObject(OBJECT::EXPLOSION, obj.xPos, obj.yPos, obj.objectID, CREATOR::OBJECT)].curAnim = obj.killAnim;
return;
} else if (obj.counter == 256 && obj.creatorType == CREATOR::PLAYER) { //reverse
obj.xAcc = obj.xPos - (obj.xOrg = jjPlayers[obj.creator].xPos);
obj.yAcc = obj.yPos - (obj.yOrg = jjPlayers[obj.creator].yPos);
}
jjDrawRotatedSpriteFromCurFrame(
obj.xPos, obj.yPos,
obj.curFrame,
MLLEWeapons::HelpfulBulletFunctions::GetAngle(obj), MLLEWeapons::HelpfulBulletFunctions::GetDirection(obj), 1,
SPRITE::SINGLEHUE, !MLLEWeapons::HelpfulBulletFunctions::IsPowerup(obj) ? 65 : 72
);
}
}
}
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.