View Single Post
FawFul

JCF Member

Joined: Jun 2007

Posts: 526

FawFul is a forum legendFawFul is a forum legendFawFul is a forum legend

Apr 9, 2015, 10:55 AM
FawFul is offline
Reply With Quote
I used this script:

#pragma require "Mario.j2a"
#pragma name "Play as Mario!"

/************************************************/
/**********Play as Mario! by FawFuL**************/
/************************************************/

void onLevelLoad() {
jjAnimSets[ANIM::SPAZ].load(0, "mario.j2a");
jjAnimSets[ANIM::SPAZ2].load(1, "mario.j2a");
}

void onPlayer(jjPLAYER@ play) {
if (play.charCurr == CHAR::JAZZ || play.charCurr == CHAR::LORI) play.morphTo(CHAR::SPAZ);
}

And i ran into 2 problems:

1: Animation index
the animation indexes for 1.23 and 1.24 are different for set Anim::SPAZ. There are unused animations in 1.23 that clutter the animation order like spaz grabbing ledges, the j2a is based on 1.24. Apparently there are ways to fix this but it's really complicated. It also makes this preset stuff redundant if it doesn't takes differences in indexes into account.

2. Wrong animations on other online players
I overrided Anim::SPAZ and Anim::SPAZ2 and they look right for 1.24 users, however you get weird cluttered images on other players. (bird animations, bullets and a few of the custom animations, iirc). Vanilla jj2 draws your own sprites and others sprites right from Anim::SPAZ, why does my custom j2a make it show 2 different things on local and online players? Is this fixable?

I suggest that it's maybe useful to have a snippet that fixes these 2 problems, because i imagine more players would want to make their own custom j2a characters. afaik there were some already that ppl liked to import .. a snippet could be nice and reusable for this.