1.0
13 Apr 2015 22:32
#pragma require "myCustom.j2a"
namespace RABBIT { //save some extra typing
array<Anim> Anims = { //This should correspond exactly to the order of animations in your .j2a. I'm assuming you're using the same order that TSF does.
AIRBOARD, AIRBOARDTURN, BUTTSTOMPLAND, CORPSE, DIE, DIVE, DIVEFIREQUIT, DIVEFIRERIGHT, DIVEUP, EARBRACHIATE, ENDOFLEVEL, FALL, FALLBUTTSTOMP, FALLLAND, FIRE, FIREUP, FIREUPQUIT, FROG, HANGFIREQUIT, HANGFIREREST, HANGFIREUP, HANGIDLE1, HANGIDLE2, HANGINGFIREQUIT, HANGINGFIRERIGHT, HELICOPTER, HELICOPTERFIREQUIT, HELICOPTERFIRERIGHT, HPOLE, HURT, IDLE1, IDLE2, IDLE3, IDLE4, IDLE5, JUMPFIREQUIT, JUMPFIRERIGHT, JUMPING1, JUMPING2, JUMPING3, LEDGEWIGGLE, LIFT, LIFTJUMP, LIFTLAND, LOOKUP, LOOPY, PUSH, QUIT, REV1, REV2, REV3, RIGHTFALL, RIGHTJUMP, ROLLING, RUN1, RUN2, RUN3, SKID1, SKID2, SKID3, SPRING, STAND, STATIONARYJUMP, STATIONARYJUMPEND, STATIONARYJUMPSTART, STONED, SWIMDOWN, SWIMRIGHT, SWIMTURN1, SWIMTURN2, SWIMUP, SWINGINGVINE, TELEPORT, TELEPORTFALL, TELEPORTFALLING, TELEPORTFALLTELEPORT, TELEPORTSTAND, VPOLE
};
}
void onLevelLoad() {
uint emptyCustomAnimSlot = 0;
while (jjAnimSets[ANIM::CUSTOM[emptyCustomAnimSlot]].firstAnim != 0) //find an unused slot in ANIM::CUSTOM
++emptyCustomAnimSlot;
jjANIMSET@ emptyCustomAnim = jjAnimSets[ANIM::CUSTOM[emptyCustomAnimSlot]];
emptyCustomAnim.load(0, "myCustom.j2a"); //adjust as needed for your particular circumstances
const uint firstCustomCharacterAnimID = emptyCustomAnim.firstAnim;
const uint firstCharAnimID = jjAnimSets[ANIM::JAZZ].firstAnim;
for (uint i = 0; i < RABBIT::Anims.length; ++i)
jjAnimations[firstCharAnimID + RABBIT::Anims[i]] = jjAnimations[firstCustomCharacterAnimID + i];
//If replacing Spaz or Lori instead, you'll need to do some extra work because of ANIM::SPAZ2 and ANIM::LORI2.
//Also don't forget the lives icon.
}
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.