Moved the creature walking logic into its oswn sub function.