hello, im making a simple game, when the player interacts with a character they are supposed to talk by adding a text box
this is my code
if (this.getWorld().getClass() == plains2.class) {
if (getX() >= 489)
{
if (getX() <= 495)
{
if (getY() >= 195)
{
if (getY() <= 210)
{
World world=getWorld();
world.addObject(new MspeechS2_1(), 261, 300);
}
}
}
}
}
}
this ends up creating a large amount of actors instead of only one. please help!