YouGroove Posted October 16, 2013 Share Posted October 16, 2013 Would help to be able using project manager to declare all maps a project would use with possibility to add maps, drop maps (It would be relative to project path and mandatory each map would have a unique name). And finally in Lua or C++ , you would have a simple command like LoadMap("Name"), that would free all ressources and scripts of current map, and would load the new map and scripts. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
beo6 Posted October 16, 2013 Share Posted October 16, 2013 I don't get it. what is so different to this as loading by filename? Quote Link to comment Share on other sites More sharing options...
YouGroove Posted October 16, 2013 Author Share Posted October 16, 2013 It don't work if you use Lua only and would want to laod a map in App.lua (specially with a map defined in your compiled Leadwerks.exe). Quote Stop toying and make games Link to comment Share on other sites More sharing options...
beo6 Posted October 16, 2013 Share Posted October 16, 2013 Last time I tried it I had no problems. (Which is a couple updates ago) Have you tried this? http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/map/mapload-r510 Quote Link to comment Share on other sites More sharing options...
YouGroove Posted October 16, 2013 Author Share Posted October 16, 2013 function App:Start() --Create a window self.window = Window:Create() self.context = Context:Create(self.window) self.world = World:Create() --Load a map return Map:Load("Maps/start.map") end function App:Loop() if self.window:Closed() or self.window:KeyHit(Key.Escape) then return false end Time:Update() self.world:Update() self.world:Render() self.context:Sync() return true end The idea would be to change map in the Loop function what don't works. Well i already tested in Lua, it can't work, caus you compile Leadwerks.exe that have a LoadMap already, and Lua Loadmap don't work to change the map level. Perhaps in C++ you control really how maps load, but in Lua it is more complicated caus Lua uses Leadwerks.exe. We discussed it there : http://www.leadwerks.com/werkspace/topic/7739-lua-and-loading-maps-question/ And the post here is just to submti some idea for people wanting to make a complete project using Lua only without needding to code special stuff in C++ to have maps passed from Lua to Leadwerks.exe. So it is just a suggestion nothing more Quote Stop toying and make games Link to comment Share on other sites More sharing options...
beo6 Posted October 16, 2013 Share Posted October 16, 2013 So this Script is also not working? http://www.leadwerks.com/werkspace/files/file/430-next-level/ Quote Link to comment Share on other sites More sharing options...
YouGroove Posted October 16, 2013 Author Share Posted October 16, 2013 I missed that one and will try it tomorrow. Thanks a lot beo6. 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.