View Single Post
chandie

JCF Member

Joined: Jan 1970

Posts: 19

chandie has disabled reputation

Mar 12, 2020, 11:04 PM
chandie is offline
Reply With Quote
Solved

Quote:
Originally Posted by Violet CLM View Post
First off, you could simplify all that like this:
Code:
void onLevelLoad() {
	jjObjectPresets[OBJECT::LIZARD].determineCurAnim(ANIM::FROG, jjIsTSF ? 12 : 11);
}
You're running into the problem that BEHAVIOR::WALKINGENEMY is one of the only parts of the game that cares about jjANIMFRAME::coldSpotY, but the frog sprites are one of the only land-based animations that don't have that property defined. Walking enemies try to align their hotSpotY point to the surface of the ground they're on, but that number defaults to 0, which is the top of the sprite. Just move it upwards until it looks better:
Code:
	jjANIMATION@ frogWalkAnim = jjAnimations[jjObjectPresets[OBJECT::LIZARD].curAnim];
	for (uint i = 0; i < frogWalkAnim.frameCount; ++i)
		jjAnimFrames[frogWalkAnim.firstFrame + i].coldSpotY = -25;
Solved. thanks a lot