Downloads containing BubbleGun.asc

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: Min* Commotion Violet CLM Battle N/A Download file
TSF with JJ2+ Only: Anniversary Bash 26 CTF Jazz2Online Capture the flag N/A Download file
TSF with JJ2+ Only: Anniversary Bash 26 Battle Jazz2Online Battle N/A Download file
TSF with JJ2+ Only: BioluminescenceFeatured Download Dragusela Capture the flag 8.5 Download file
TSF with JJ2+ Only: Mt. Gongga Loon Battle N/A Download file
TSF with JJ2+ Only: A Cloudy DayFeatured Download Dragusela Battle 9.5 Download file
TSF with JJ2+ Only: Distant PlateauFeatured Download Dragusela Capture the flag 8.4 Download file
TSF with JJ2+ Only: Lake PartyFeatured Download Dragusela Battle 9.5 Download file
JJ2+ Only: Anniversary Bash 25 Battle Jazz2Online Battle N/A Download file
JJ2+ Only: Anniversary Bash 25 CTF Jazz2Online Capture the flag N/A Download file
JJ2+ Only: Forgotten CivilisationFeatured Download PurpleJazz Capture the flag 8.7 Download file
TSF with JJ2+ Only: Scarlet WealdFeatured Download PurpleJazz Capture the flag 9.5 Download file
TSF with JJ2+ Only: Halle der OrgelpfeifenFeatured Download Loon Capture the flag 8.7 Download file
TSF with JJ2+ Only: Winterfrost Mountains Dragusela Battle N/A Download file
TSF with JJ2+ Only: Western WildernessFeatured Download Dragusela Capture the flag 9.2 Download file
TSF with JJ2+ Only: Anniversary Bash 24 Battle Jazz2Online Battle N/A Download file
JJ2+ Only: Ethereal RiverFeatured Download Dragusela Battle 8.5 Download file
TSF with JJ2+ Only: Malice in WonderlandFeatured Download Loon Battle 9.9 Download file
TSF with JJ2+ Only: LandfallFeatured Download Loon Battle 9.4 Download file
TSF with JJ2+ Only: Peaceful Worlds Dragusela Multiple 7.5 Download file
TSF with JJ2+ Only: Anniversary Bash 23 levels Jazz2Online Multiple N/A Download file
JJ2+ Only: violetclm DOM Episodes I...Featured Download Violet CLM Custom / Concept 9 Download file
TSF with JJ2+ Only: SommerdammFeatured Download Loon Capture the flag 9 Download file
TSF with JJ2+ Only: Anniversary Bash 22 levels Jazz2Online Multiple N/A Download file
TSF with JJ2+ Only: The AbyssFeatured Download PurpleJazz Battle 9.8 Download file
TSF with JJ2+ Only: Umbral ThicketFeatured Download PurpleJazz Battle 9.5 Download file
Custom Weapons...Featured Download Violet CLM Other 10 Download file

File preview

#pragma require "BubbleGun.asc"
#include "MLLE-Weapons.asc"
#pragma require "BubbleGun-mlle.j2a"

namespace BubbleGun {
	class Weapon : MLLEWeapons::WeaponInterface {
		Weapon() {
			super(
				regularObjectTemplate: MLLEWeapons::ObjectTemplate(
					xSpeed: 1.5,
					xAcc: 0.125,
					animSpeed: 1,
					killAnim: jjAnimSets[ANIM::AMMO].firstAnim + 82,
					curAnim: jjAnimSets[ANIM::AMMO].firstAnim + 8,
					lightType: LIGHT::POINT2,
					counterEnd: 105,
					state: STATE::FLY
				),
				powerupObjectTemplate: MLLEWeapons::ObjectTemplate(
					xSpeed: 2,
					xAcc: 0.1875,
					animSpeed: 2,
					killAnim: jjAnimSets[ANIM::AMMO].firstAnim + 82,
					curAnim: 0,
					lightType: LIGHT::POINT2,
					counterEnd: 105,
					state: STATE::FLY
				),
				animSetFilename: "BubbleGun-mlle.j2a",
				pickupAnimation: jjAnimSets[ANIM::AMMO].firstAnim + 8,
				poweredUpPickupAnimation: 0,
				ammoCrateAnimation: 2,
				powerupAnimation: 1,
				behavior: function(obj, powerup) {
					jjSample(obj.xPos, obj.yPos, SOUND::COMMON_PLOP2);
					obj.behavior = Behavior;
				}
			);
		}
	}
	
	void Behavior(jjOBJ@ bubble) {
		if (jjMaskedPixel(int(bubble.xPos) + int(bubble.xSpeed), int(bubble.yPos)) || jjMaskedPixel(int(bubble.xPos) - int(bubble.xSpeed), int(bubble.yPos)) || jjMaskedPixel(int(bubble.xPos), int(bubble.yPos) + int(bubble.ySpeed)) || jjMaskedPixel(int(bubble.xPos), int(bubble.yPos) - int(bubble.ySpeed))) {
			jjSample(bubble.xPos, bubble.yPos, SOUND::P2_SPLOUT);
		}
		
		bubble.behave(BEHAVIOR::WATERSHIELDBULLET);
		
		if (MLLEWeapons::HelpfulBulletFunctions::IsPowerup(bubble) && bubble.state == STATE::FLY && bubble.counter > 0) {
			switch (bubble.direction) {
				case 1: bubble.xSpeed -= 0.08; bubble.ySpeed -= 0.08; break;
				case -1: bubble.xSpeed += 0.08; bubble.ySpeed -= 0.08; break;
			}
		}
	}
}