PixelPest wrote:That can't be your whole code. Where are you calling those functions from? Also try NPC:transform(). In terms of Defines, they act just like variables; try setting them in onStart() and make sure the d in defines is capitalized
That's not my whole code, I just felt like I'd just send the function and let you assume where it was called. The first code is called onStart(), the second is called onTick(). I tested it with the ID of a goomba and it worked, but when I tried coins, they stayed as rupees. The first code is working I just wasn't sure which one you were asking for.
Defines works without capitalization, but if that's more acceptable, I'll change it. I'll check out NPC:transform() even though I already changed the rupees sprites and the SFX.
EDIT: NPC:tranform() does not work either, my guess is the game actively forces the coins' IDs to be the rupees' IDs.
Code: Select all
function onTick()
armorSet()
correctJump()
for _, n in pairs(NPC.get(251, -1)) do
n:transform(10)
end
end
If I try a different ID, such as 1 (Goomba), it works fine.
EDIT 2: Off-topic question, is there a remainder function in LunaLua?