#Could I get some help getting Cap animations to play properly?
1 messages · Page 1 of 1 (latest)
#include "nsmb.hpp"
ncp_hook(0x021060DC, 10) // I put overlay 10 but it might be in a different overlay.
void SMWCapBehavior(Player* player) {
bool isMarioFalling = player->velocity.y < -0.2fx; // check to see if mario goes below -2 velocity on the Y axis.
bool hasMarioLanded = player->collisionFlag.ground;
if (isMarioFalling) {
player->model.flags = PlayerModel::Flags::RenderSeparateCap; // render both mario and his cap seperately
player->model.cap.animation.init(0x4, 0); // initalize the cap falling animation
}
if (hasMarioLanded) {
player->model.cap.animation.init(0x3, 0);
}
}
this is the code I have rn, and it works perfectly fine when the animations are flipped (put on when fall, rise when land) only by swapping 0x3 for 0x4 and visa versa
Video to show what I mean