Here is my code a small part of my code…
function joysticks()
if CurrentTouch.state == BEGAN or CurrentTouch.state == MOVING then
if CurrentTouch.x < 300 then
d = color(234, 229, 229, 255)
fill(b)
strokeWidth(10)
ellipse(CurrentTouch.x, CurrentTouch.y, 100, 100)
else
d = color(234, 229, 229, 255)
fill(b)
strokeWidth(1)
ellipse(CurrentTouch.x, CurrentTouch.y, 100, 100)
end
else
ellipse(150,150,100,100)
ellipse(600,150,100,100)
end
end
In the game I’m making I am going to make a character be controlled by a type of common joystick controller. The main part I’m having trouble with is the joysticks. There are two joysticks, one on the left and one on the right. I am having a problem naming the “ellipse” methods something different than the syntax of it, thus I can’t figure out how control only ONE when there are two on the screen. I’ve tried turning them into variables but failed…