Hi!!
I am trying to make an actor spawn at a specific area when an actor is clicked which is a button for a quiz. PLSS Help me!!
public class Answer1c extends Education
{
/**
* Act - do whatever the Answer1c wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
if (Greenfoot.mouseClicked(this))
Greenfoot.setImage(//image of the correct answer
getX, getY
Greenfoot.playSound("CorrectAnswer.wav");
}
}if (Greenfoot.mouseClicked(this))
{
// codes to process
}Actor message = new Message("Correct");getWorld().addObject(message, 300, 200);