function on_input(self, action_id, action)
require "scripts.levelStage"
if action.pressed and gui.pick_node(gui.get_node("menu"), action.x, action.y) then
msg.post("main:/controller", "menu pressed")
end
if action.pressed and gui.pick_node(gui.get_node("1"), action.x, action.y) then
msg.post("main:/controller", "level 1 pressed")
print(levelStage)
end
if levelStage >= 2 then
gui.delete_node(self.level2)
if action.pressed and gui.pick_node(gui.get_node("2"), action.x, action.y) then
print(levelStage)
– script 2
if action.pressed and gui.pick_node(gui.get_node("tutorial"), action.x, action.y) then
require "scripts.levelStage"
msg.post("main:/controller", "pressed tutorial")
levelStage = levelStage + 1
print(levelStage)
if levelStage >= 3 then
levelStage = 3
end
end
sorry i should of included more code, here is the code that is relevant to the problem(i think), if the problem cannot be identified i’ll be glad to share the file