YouGroove Posted September 28, 2013 Share Posted September 28, 2013 I have that code in Main App.lua : function App:Start() --Set the application title self.title="test" ... .... --Load a map local mapfile = System:GetProperty("map","Maps/start.map") if Map:Load(mapfile)==false then return false end return true end function App:Loop() if self.window:KeyDown(Key.L) then Map:Load("Maps/start2.map") Time:Delay(1000) end ... ... return true end The problem is in the app loop calling : Map:Load("Maps/start2.map") says unknown function ? what did i missed ? Quote Stop toying and make games Link to comment Share on other sites More sharing options...
AggrorJorn Posted September 28, 2013 Share Posted September 28, 2013 I would replace keydown with keyhit since you are loading a new scene every single frame when a key is being pressed. Quote Link to comment Share on other sites More sharing options...
YouGroove Posted September 28, 2013 Author Share Posted September 28, 2013 I even tried on start function : --Load a map local mapfile = System:GetProperty("map","Maps/start.map") mapfile = System:GetProperty("map","Maps/start2.map") Map:Load(mapfile) Time:Delay(1000) local mapfile = System:GetProperty("map","Maps/start.map") if Map:Load(mapfile)==false then return false end return true The debugger says function unknown with "start.map" I put some delay before loading start.map after loading start2.map. -------------- Another annoying thing : I tried also to simply load map "start2.map", but it always load "start.map" because "start.amp" is displayed in LE3 editor i think. So when launching debugger, LE3 will laucnh the map on the editor it seems and not the one you defined on "App.lua" Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Josh Posted September 28, 2013 Share Posted September 28, 2013 I have that code in Main App.lua : function App:Start() --Set the application title self.title="test" ... .... --Load a map local mapfile = System:GetProperty("map","Maps/start.map") if Map:Load(mapfile)==false then return false end return true end function App:Loop() if self.window:KeyDown(Key.L) then Map:Load("Maps/start2.map") Time:Delay(1000) end ... ... return true end The problem is in the app loop calling : Map:Load("Maps/start2.map") says unknown function ? what did i missed ? I copied and pasted this into the script editor to run it, but since it is not an actual runnable script I am not pursuing my investigation any further at this time. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
YouGroove Posted September 28, 2013 Author Share Posted September 28, 2013 What does mean runnable ? Caus i simply runned it from LE3 debugger. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.