Name | Author | Game Mode | Rating | |||||
---|---|---|---|---|---|---|---|---|
Anniversary Bash 24 CTF | Jazz2Online | Capture the flag | N/A | |||||
Custom Weapons... | Violet CLM | Other | 10 |
#pragma require "ZeusArtillery.asc"
#include "MLLE-Weapons.asc"
#pragma require "SmokeWopens.j2a"
namespace SmokeWopens {
namespace ZeusArtillery {
class Wopen : MLLEWeapons::WeaponInterface {
Wopen() {
super(
regularObjectTemplate: MLLEWeapons::ObjectTemplate(
curAnim: 0,
killAnim: jjAnimSets[ANIM::AMMO].firstAnim + 5,
var: array<int> = {0,0,0,0,0,0,16},
isBlastable: false
),
powerupObjectTemplate: MLLEWeapons::ObjectTemplate(
curAnim: 0,
frameID: 1,
animSpeed: 2,
killAnim: jjAnimSets[ANIM::AMMO].firstAnim + 5,
var: array<int> = {0,0,0,0,0,0,16},
isBlastable: false
),
animSetFilename: "SmokeWopens.j2a",
animSetID: 1,
style: WEAPON::MISSILE,
roundsPerPickup: 100,
pickupAnimation: jjAnimSets[ANIM::AMMO] + 59,
poweredUpPickupAnimation: 1,
traits: se::weapon_default_traits | se::weapon_goes_through_walls | se::weapon_is_super_weapon | se::weapon_causes_splash_damage,
behavior: function(obj, powerup) { obj.behavior = Behavior; }
);
}
}
void Behavior(jjOBJ@ obj) {
if (obj.state == STATE::START) {
obj.state = STATE::FLY;
//obj.yOrg = (obj.creatorType == CREATOR::PLAYER) ? jjPlayers[obj.creatorID].yPos : jjObjects[obj.creatorID].yPos;
obj.yPos = 1;
} else if (obj.state == STATE::EXPLODE) {
//uint playersHit = 0;
//jjPLAYER@ creator = (obj.creatorType == CREATOR::PLAYER) ? jjPlayers[obj.creatorID] : null;
//const bool canDamageOtherPlayers = (jjIsServer || jjGameConnection == GAME::LOCAL) && (jjGameState == GAME::STARTED || jjGameState == GAME::OVERTIME);
const int var6 = MLLEWeapons::HelpfulBulletFunctions::IsPowerup(obj) ? 8 : 0;
for (int i=-50; i < 50;i++) {
jjOBJ@ o = jjObjects[jjAddObject(OBJECT::RFBULLET, obj.xPos + (jjRandom()%200) - 100, obj.yPos + (jjRandom()%200) - 100, obj.creatorID, obj.creatorType, BEHAVIOR::INACTIVE)];
o.playerHandling = obj.playerHandling;
o.counter = 0;
o.counterEnd = 1;
o.freeze = 0;
o.var[6] = var6;
o.xSpeed = o.ySpeed = o.xAcc = o.yAcc = 0;
o.curAnim = o.killAnim = jjAnimSets[ANIM::AMMO].firstAnim + 3;
o.state = STATE::START;
o.determineCurFrame();
o.behavior = BEHAVIOR::RFBULLET;
/*if (canDamageOtherPlayers && (playersHit & (1 << i)) == 0 && (creator is null || creator.isEnemy(victim)) && o.doesCollide(victim)) {
victim.hurt(obj.animSpeed, false, creator);
playersHit |= (1 << i);
}*/
}
obj.behavior = BEHAVIOR::EXPLOSION2;
} else {
jjPARTICLE@ particle = jjAddParticle(PARTICLE::STAR);
if (particle !is null) {
particle.xPos = obj.xPos;
particle.yPos = obj.yPos;
particle.xSpeed = jjRandom()&5;
particle.ySpeed = jjRandom()&5;
particle.star.color = jjRandom()%100;
particle.star.size = (jjRandom()%50) + 1;
particle.star.frame = (jjRandom()%2) - 1;
}
jjOBJ@ tail = jjObjects[jjAddObject(OBJECT::SEEKERBULLET, obj.xPos, obj.yPos, obj.creatorID, CREATOR::PLAYER, BEHAVIOR::INACTIVE)];
tail.counter = 0;
tail.counterEnd = 0;
tail.playerHandling = HANDLING::DYING;
tail.state = STATE::START;
tail.curAnim = tail.killAnim = obj.killAnim;
tail.behavior = BEHAVIOR::SEEKERBULLET;
tail.behave();
obj.yPos += 13; //no problems with ricocheting
if (obj.yPos >= obj.yOrg)
obj.state = STATE::EXPLODE;
jjDrawSpriteFromCurFrame(obj.xPos, obj.yPos, obj.curFrame);
}
}
}
}
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.