I've run into a bit of trouble with my doors. The code for going to the next level is
However, I have another door to that room and I want the player to spawn at a different location if he uses the other door. I have tried using this code, but it doesn't seem to be working
How would I go about doing this?
Thanks
if (getOneIntersectingObject( DoorToRoom.class) !=null)
{
Greenfoot.setWorld(new SmallRoom());
} if (getOneIntersectingObject( DoorToRoom.class) !=null)
{
Greenfoot.setWorld(new World2());
setLocation(500,500);
}

