3.0
25 Apr 2017 22:10
void onLevelLoad() {
jjANIMATION@ anim = jjAnimations[jjAnimSets[ANIM::COMMON] + 2]; //the rain "bubble"
for (uint i = 0; i < anim.frameCount; ++i) {
jjANIMFRAME@ frame = jjAnimFrames[anim + i];
jjPIXELMAP rain(1,32);
for (uint y = 0; y < rain.height; ++y) {
if (y <= 24) {
rain[0,y] = 75;
}
else {
rain[0,y] = 74;
}
}
rain.save(frame);
frame.hotSpotX = -frame.width/2;
frame.hotSpotY = -frame.height;
}
}
void onMain() {
for (int i = 0; i < 1024; i++) { //loop through the global array jjParticles[1024]
jjPARTICLE@ particle = jjParticles[i];
if (particle.type == PARTICLE::RAIN) {
particle.xSpeed = 0; //make rain fall straight down
particle.ySpeed = jjLocalPlayers[0].ySpeed < 0? 10 : int(10 + jjLocalPlayers[0].ySpeed); //the rain speed accounts for differences in the player speed, and so won't appear to fall more slowly when the player is falling
}
}
}
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.