Page 1 of 1

Help with playeranim.lua

Posted: Tue Feb 20, 2018 11:58 pm
by RadRedVito
Hello. Sorry if it was questioned but I would like to know how to use playeranim.lua. I want to add some extra frames for the character but I am so bad at coding so can you please guide me? If its possible can you use an example?

Re: Help with playeranim.lua

Posted: Tue Mar 20, 2018 1:40 am
by WildW
Bumping this because I’ve found a similar thread that may hold the answer you’ve been looking for
https://www.smbxgame.com/forums/ ... ua#p262591

Re: Help with playeranim.lua

Posted: Tue Mar 20, 2018 3:43 am
by RadRedVito
WildWEEGEE wrote:Bumping this because I’ve found a similar thread that may hold the answer you’ve been looking for
https://www.smbxgame.com/forums/ ... ua#p262591
I saw this thread but I didn't really get it. I could if there was some sorts of example. Thanks for the help anyways. :)

Re: Help with playeranim.lua

Posted: Tue Mar 20, 2018 7:09 am
by Emral
Hoeloe's post has an example though.
In-game it's used by new characters like Megaman and Bowser, but reading their code will be more difficult than wrapping your head around Hoeloe's explanation.

Re: Help with playeranim.lua

Posted: Tue Mar 20, 2018 8:30 am
by RadRedVito
Enjl wrote:Hoeloe's post has an example though.
In-game it's used by new characters like Megaman and Bowser, but reading their code will be more difficult than wrapping your head around Hoeloe's explanation.
I mean a luadll file with a code which adds new frames for an animation (something like paralax example in the PGE wiki). I guess I'll try harder to make it work.

Re: Help with playeranim.lua

Posted: Tue Mar 20, 2018 8:47 am
by Emral
local panim = API.load("playeranim")
local myAnim = panim.Anim({1,2,3,4,5})

function onStart()
myAnim:play(player)
end

this is just hoeloe's example

Re: Help with playeranim.lua

Posted: Tue Mar 20, 2018 8:49 am
by RadRedVito
Enjl wrote:local panim = API.load("playeranim")
local myAnim = panim.Anim({1,2,3,4,5})

function onStart()
myAnim:play(player)
end

this is just hoeloe's example
I'll try that. Thank you so much!