I was hoping I could get some help with a strange issue I've encountered while creating a custom character. As a heads up, this is my first time modding for any game and my coding experience is very minimal. I've created a custom Donkey Kong and have made custom animations and functions thanks to the available resources on the official Github and YouTube videos by Garrulous64 and Q10isarobot. Unfortunately, the custom animations are replacing the animations of all characters not just my DK. My main.lua and animations.lua files are inside this specific mod's folder and not the general mods folder.
To paraphrase, how would I be able to apply my custom animations only to the DK I created instead of every character in the game ([CS] characters included)?
Here is the code I'm using used for animations:
Any help or insight will be greatly appreciated.
To paraphrase, how would I be able to apply my custom animations only to the DK I created instead of every character in the game ([CS] characters included)?
Here is the code I'm using used for animations:
LUA:
local function mario_update(m)
if m.character.type == CT_DKB64 then
if m.marioObj.header.gfx.animInfo.animID == MARIO_ANIM_IDLE_HEAD_LEFT then
smlua_anim_util_set_animation(m.marioObj, "dkb64_animIdleHeadLeft")
end
if m.marioObj.header.gfx.animInfo.animID == MARIO_ANIM_IDLE_HEAD_RIGHT then
smlua_anim_util_set_animation(m.marioObj, "dkb64_animIdleHeadRight")
end
if m.marioObj.header.gfx.animInfo.animID == MARIO_ANIM_IDLE_HEAD_CENTER then
smlua_anim_util_set_animation(m.marioObj, "dkb64_animIdleHeadCenter")
end
if m.marioObj.header.gfx.animInfo.animID == MARIO_ANIM_SINGLE_JUMP then
smlua_anim_util_set_animation(m.marioObj, "dkb64_animSingleJump")
end
if m.marioObj.header.gfx.animInfo.animID == MARIO_ANIM_GENERAL_FALL then
smlua_anim_util_set_animation(m.marioObj, "dkb64_animGeneralFall")
end
if m.marioObj.header.gfx.animInfo.animID == MARIO_ANIM_GENERAL_LAND then
smlua_anim_util_set_animation(m.marioObj, "dkb64_animGeneralLand")
end
if m.marioObj.header.gfx.animInfo.animID == MARIO_ANIM_LAND_FROM_SINGLE_JUMP then
smlua_anim_util_set_animation(m.marioObj, "dkb64_animLandFromSingleJump")
end
if m.marioObj.header.gfx.animInfo.animID == MARIO_ANIM_SLOW_LEDGE_GRAB then
smlua_anim_util_set_animation(m.marioObj, "dkb64_animSlowLedgeGrab")
end
if m.marioObj.header.gfx.animInfo.animID == MARIO_ANIM_RUNNING then
smlua_anim_util_set_animation(m.marioObj, "dkb64_animRunning")
end
if m.marioObj.header.gfx.animInfo.animID == MARIO_ANIM_STOP_CROUCHING then
smlua_anim_util_set_animation(m.marioObj, "dkb64_animStopCrouching")
end
if m.marioObj.header.gfx.animInfo.animID == MARIO_ANIM_START_CROUCHING then
smlua_anim_util_set_animation(m.marioObj, "dkb64_animStartCrouching")
end
if m.marioObj.header.gfx.animInfo.animID == MARIO_ANIM_CROUCHING then
smlua_anim_util_set_animation(m.marioObj, "dkb64_animCrouching")
end
if m.marioObj.header.gfx.animInfo.animID == MARIO_ANIM_SKID_ON_GROUND then
smlua_anim_util_set_animation(m.marioObj, "dkb64_animSkidOnGround")
end
if m.marioObj.header.gfx.animInfo.animID == MARIO_ANIM_STOP_SKID then
smlua_anim_util_set_animation(m.marioObj, "dkb64_animStopSkid")
end
end
end
Any help or insight will be greatly appreciated.