Search found 10 matches

by More Ragtime
Sat Aug 10, 2013 10:46 pm
Forum: Support and Development
Topic: Character with animation
Replies: 27
Views: 17438

Re: Character with animation

Because you're attempting to feed a table into love.graphics.draw() . Try this: function love.load() animation = {} animation[1] = love.graphics.newImage('Untitled.png') animation[2] = love.graphics.newImage('Untitled2.png') animation[3] = love.graphics.newImage('Untitled3.png') counter = 0 frame =...
by More Ragtime
Sat Aug 10, 2013 10:24 pm
Forum: Support and Development
Topic: Character with animation
Replies: 27
Views: 17438

Re: Character with animation

There are several ways to do it. If your going to put the animation frames in a table, then at least just do it like: love.load() animation = {} animation[1] = love.graphics.newImage('anim1.png') animation[2] = love.graphics.newImage('anim2.png') animation[3] = love.graphics.newImage('anim3.png') e...
by More Ragtime
Sat Aug 10, 2013 9:41 pm
Forum: Support and Development
Topic: Character with animation
Replies: 27
Views: 17438

Re: Character with animation

yeah sorry, it says

Code: Select all

Error
main.lua:4: attempt to index global 'Untitled' (a nil value)

Traceback

main.lua:4: in function 'load'
[C]: in function 'xpcall'
by More Ragtime
Sat Aug 10, 2013 9:08 pm
Forum: Support and Development
Topic: Character with animation
Replies: 27
Views: 17438

Re: Character with animation

ah, i forgot to put the png extention. but now its telling me its a nil value
by More Ragtime
Sat Aug 10, 2013 8:12 pm
Forum: Support and Development
Topic: Character with animation
Replies: 27
Views: 17438

Re: Character with animation

its telling me there is an incorrect paramiter type at line 22.
by More Ragtime
Sat Aug 10, 2013 5:05 pm
Forum: Support and Development
Topic: Character with animation
Replies: 27
Views: 17438

Re: Character with animation

another error

Code: Select all

Error
main.lua:12: attempt to perform arithmetic on global 'frame' (a nil value)

Traceback

main.lua:12: in function 'update'
[C]:in function 'xpcall'
by More Ragtime
Sat Aug 10, 2013 3:28 pm
Forum: Support and Development
Topic: Character with animation
Replies: 27
Views: 17438

Re: Character with animation

unction love.load() animation = {} animation.frame = 1 animation.frame1 = (untitled) animation.frame2 = (untitled1) animation.frame3 = (untitled2) animation.image = animation.frame1 end function love.update(dt) if animation.frame ==1 then animation.image = animation.frame1 frame=frame + 1 else if a...
by More Ragtime
Sat Aug 10, 2013 2:46 pm
Forum: Support and Development
Topic: Character with animation
Replies: 27
Views: 17438

Re: Character with animation

When i did that the animation didn't play it was just the whole image being drawn. The character moves though. is AnAL the only practical way to play animations in love? i though i heard they cut it from love.
by More Ragtime
Sat Aug 10, 2013 1:40 am
Forum: Support and Development
Topic: Character with animation
Replies: 27
Views: 17438

Character with animation

Hi, im trying to code a charcter that has a walking animation. I'm using the hampster ball tutorial with the AnAL tutorial and it seems to be conflicting, but i don't know of any other way to put an idle or walking animation in the game this is my main.lua code require("AnAL") function lov...