Hey all!
I’m working on an animation for a game I’m making, however I’m encountering a strange problem.
I have the animation working fine when using Codea assets, but when I try to use 6 graphics from my documents folder, I get an error at line #31.
Is this a bug of some sort or am I doing something wrong?
Any help would be greatly appreciated!
-- Animation Test
-- Use this function to perform your initial setup
function setup()
chop1=readImage("Planet Cute:Gem Blue")
chop2=readImage("Planet Cute:Gem Green")
chop3=readImage("Planet Cute:Gem Orange")
chop4=readImage("Planet Cute:Character Boy")
chop5=readImage("Planet Cute:Character Cat Girl")
chop6=readImage("Planet Cute:Character Horn Girl")
anim={chop1,chop2,chop3,chop4,chop5,chop6}
animNo=1
animTimer=0
animDelay=0.1
charY=HEIGHT/5
end
-- This function gets called once every frame
function draw()
-- This sets a dark background color
background(0, 0, 0, 255)
animTimer=animTimer+DeltaTime
if animTimer>animDelay then
animNo=animNo+1
if animNo>#anim then
animNo=1
end
animTimer=0
end
sprite(anim[animNo],WIDTH/2,charY)
charY=charY+3
end