how would I go about adding missions to a level / map? For example, can not exit the map unless a key item is picked up.
My game is located here: http://www.greenfoot.org/scenarios/11862


public class Door extends Actor { private Actor key; // to hold the key that opens the door // creates the key that opens the door public Door() { key = new Key(); } // gets the key that opens the door public Actor getKey() { return key; } // the door is unlocked when the key is removed from the world public boolean isLocked() { return key.getWorld() != null; } }
Door door = new Door(); addObject(door, /* location of door */); addObject(door.getKey(), /* location of key */);