2.0
14 Feb 2013 18:11
jjOBJ@ trail;
/* Purple fireball works just like orange fireball 1.0, by Violet CLM
http://www.jazz2online.com/snippets/49/purple-fireball-works-just-like-orange-fireball/ */
void fireballVioletStats() {
jjObjectPresets[OBJECT::FIREBALLBULLETPU].xSpeed = jjObjectPresets[OBJECT::FIREBALLBULLET].xSpeed;
jjObjectPresets[OBJECT::FIREBALLBULLETPU].xAcc = jjObjectPresets[OBJECT::FIREBALLBULLET].xAcc;
jjObjectPresets[OBJECT::FIREBALLBULLETPU].counterEnd = jjObjectPresets[OBJECT::FIREBALLBULLET].counterEnd;
}
void fireballSpecialEffects () {
//look like a big fireball
jjObjectPresets[OBJECT::FIREBALLBULLETPU].determineCurAnim(ANIM::BILSBOSS, 3);
//same, but for shooting upwards
jjObjectPresets[OBJECT::FIREBALLBULLETPU].special = jjObjectPresets[OBJECT::FIREBALLBULLETPU].determineCurAnim(ANIM::BILSBOSS, 3, false);
//explode into a red cloud like RFs do
jjObjectPresets[OBJECT::FIREBALLBULLETPU].killAnim = jjObjectPresets[OBJECT::FIREBALLBULLETPU].determineCurAnim(ANIM::AMMO, 3, false);
//shine brightly
jjObjectPresets[OBJECT::FIREBALLBULLETPU].lightType = LIGHT::BRIGHT;
jjObjectPresets[OBJECT::FIREBALLBULLETPU].light = 8;
}
void onLevelLoad() {
fireballVioletStats();
fireballSpecialEffects();
}
void spawnFireTrail(jjOBJ@ obj) {
@trail = jjObjects[jjAddObject(OBJECT::EXPLOSION, obj.xPos, obj.yPos)];
trail.determineCurAnim(ANIM::AMMO, 3);
trail.lightType = LIGHT::POINT;
}
void onMain() {
for (int i = 1; i < jjObjectCount; i++) { //for
if (jjObjects[i].eventID == OBJECT::FIREBALLBULLETPU //every fireball fired
&& jjObjects[i].objType == 1 //that's still a bullet, and not just the explosion it makes
&& jjObjects[i].counter%3 == 0)
{
spawnFireTrail(jjObjects[i]);
}
}
}
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.