float zoogX; float zoogY; float eyeR; float eyeG; float eyeB; void setup() { size(750,750); //Sets size zoogX = width/2; zoogY = height + 100; smooth(); frameRate(30); } void draw() { background(255); //Draws a white background //Set ellipses and rectangles to center ellipseMode(CENTER); rectMode(CENTER); //Alien body stroke(0); fill(175); rect(zoogX,zoogY,20,100); //Alien head stroke(0); fill(255); ellipse(zoogX,zoogY-30,60,60); //Alien eyes eyeR = random(255); eyeG = random(255); eyeB = random(255); fill(eyeR,eyeG,eyeB); ellipse(zoogX-19,zoogY-30,16,32); ellipse(zoogX+19,zoogY-30,16,32); //Alien legs stroke(0); line(zoogX-10,zoogY+50,zoogX-10,zoogY+60); line(zoogX+10,zoogY+50,zoogX+10,zoogY+60); // Alien appears randomly on the screen constantly zoogX = random(width); zoogY = random(height); } void mousePressed() { //Alien appears on the screen randomly on mouse click, must be uncommented to work //zoogX = random(width); //zoogY = random(height); println("Take me to your leader!"); }