Page 1 of 1

Help changing Snailicorn animation (I don't know Lua)

Posted: Mon Jan 03, 2022 7:49 pm
by Metrovania
So I've tried to wrap my head around lua for a bit, and I have to be honest I don't have a clue what I'm doing XD

What I'm attempting to do, is adjust the frame count for the Snailicorn NPC. Currently it has 2 frames for walking, and 1 frame after being hit and stunned. Normally you could just increase the frame count in the configure tool, but since it doesn't run through all the frames in a cycle, it's not that simple.

I'm trying to change it's WALK frame count to 8, and it's stunned frame count to 2. If you were to stack the frames ideally it'd be
LWalk1
LWalk2
LWalk3
LWalk4
LWalk5
LWalk6
LWalk7
LWalk8
LStun1
LStun2
RWalk1
RWalk2
RWalk3
RWalk4
RWalk5
RWalk6
RWalk7
RWalk8
RStun1
RStun2

I take it to chance make this change, I'd have to edit Snailicorn.lua then put the lua file into my level folder?

Re: Help changing Snailicorn animation (I don't know Lua)

Posted: Sun Feb 05, 2023 3:00 am
by sonic_de_hedhog
same with koopa shells

Re: Help changing Snailicorn animation (I don't know Lua)

Posted: Tue Feb 07, 2023 2:37 am
by Emral
In the current version of SMBX2, Snailicorns are hardcoded to have only one frame for its hurt animation. (walkframes = frames - 1)
This will change in the next release. (walkframes = frames - stunframes)