SpiderPig Posted March 11, 2013 Share Posted March 11, 2013 Can you free / release a loaded map? Quote Link to comment Share on other sites More sharing options...
YouGroove Posted March 11, 2013 Share Posted March 11, 2013 What you mean ? I can create a map in LE3 and release or distribute it as tutorial or game demo i think ? Quote Stop toying and make games Link to comment Share on other sites More sharing options...
SpiderPig Posted March 11, 2013 Author Share Posted March 11, 2013 I mean I can load a map with Map:Load () which returns its success as true or false... But is there a Map:Release () function? Or a way to easily remove the contents of that map from the game? Quote Link to comment Share on other sites More sharing options...
YouGroove Posted March 11, 2013 Share Posted March 11, 2013 I don't think, you need to make it in the editor i think. What do you want to remove ? Perhaps you could just load the scene , and load by code the elements you could want to add than remove later ? Is it to make some personnal level editor ? Quote Stop toying and make games Link to comment Share on other sites More sharing options...
AggrorJorn Posted March 11, 2013 Share Posted March 11, 2013 What SpiderPig means is that the memory containing the loaded level is still there, even if you would load a new level. The release method is normally invoked to remove objects from the memory. However, what we don;t know is whether this also works for loaded maps. Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted March 12, 2013 Author Share Posted March 12, 2013 Aggror's correct. I want to load different levels as the game progresses. Currently if I load level 1 then load level 2, both levels are merged....I may have to figure out a different method..... Quote Link to comment Share on other sites More sharing options...
Chris Vossen Posted March 12, 2013 Share Posted March 12, 2013 So the proper way to do it is a call to World:Clear(), unfortunately we forgot to tag it for lua (and document it). I'm posting a bug report for this right now and hopefully the lua tag (and documentation) will be available with the next build. Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted March 12, 2013 Author Share Posted March 12, 2013 Awesome, Thanks! Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted March 12, 2013 Author Share Posted March 12, 2013 self.world:Clear() in Lua throws an error.... attempt to call method 'Clear' (a nil value) ....or is that what you meant by you forgot to tag it for lua? Quote Link to comment Share on other sites More sharing options...
Josh Posted March 12, 2013 Share Posted March 12, 2013 Our mistake, this got overlooked. Will fix in the next build. 1 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...
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.