After running a few times it stopped showing the ellipse when touching the screen.
Had to force close app to fix.
Anything wrong code wise or just buggy?
-- test
-- Use this function to perform your initial setup
function setup()
print("Hello World!")
end
-- This function gets called once every frame
function draw()
-- This sets a dark background color
background(0, 0, 0, 119)
-- This sets the line thickness
strokeWidth(50)
ellipse(CurrentTouch.x,CurrentTouch.y,103)
-- Do your drawin
-- Train:draw()
end
function touched(touch)
--print("hi")
if touch.state == BEGAN then
print("began")
-- Train:touched(touch)
end
end
I was about to ask what an ID-1OT issue is… ~X( It is a known bug in Codea, if anything unexpected happens with you code, just restart Codea, if it is still acting weird, check you code, and then report it. Your code is working fine! Welcome to Codea!
Any good tutorials? I found plenty of syntax guides and the demo apps help.
If I want to add many sprites is it best to Create a class for each type of sprite then creat an array of sprites to call during the draw routine and maybe touched routines?
Lua seems strait forward but codea seems like it might be a special variation of it?
Also can I create “text” Boxes for user input?
I’m sure I have more questions coming but hopefully a tutorial can provide most of the answers.