I think you didn't understand Superku's suggestion. He meant that you should place an entity in every level you need the mouse to be active in and assign the action he posted to that entity. Additionally you should disable the mouse right before you call level_load. This way the mouse gets inactive as soon as a new level is loaded and if the level contains such a dummy entity it gets activated.