Search the Community
Showing results for tags 'Load'.
-
Current Save/Load system have flows & bugs and public Component::Save/Load would allow to make custom universal one. In Lua they should be usable as well, with allowable nil for binstream & extra or as overload with just table, scene with optionable extra. Also it would allow to use those methods for other purposes, including save and sending only single component via network etc. Current issues are: All entities are saved - when in fact only 20% or less might be actual needs saving. Beside extra entities it's also saves flowgraph and other binary data And such extra data making "save" file is too big, because it's actually a map which is already too much for save files and can't be used for sure for network stuff. Reload() breaks lights and does not remove entities that were removed from scene before saving. No ability to add own properties, which save file may need It would be nice to have working save/load system in Ultra, but at this moment it's necessary to have at least Load/Save available to user both C++ and Lua so i could finish custom save/load system without users having to wait another months/years before official one will be ready for actual use. While working on my game such system saved me a ton of times and would help a lot other people, but i can't make it universal atm.
-
Hello everyone, I just playing around leadwerks c++ to learn engine. I've created a simple map with editor and save it under Maps folder. Once I try to load that map through cpp code and give path parameter as "Maps/sm.map", leadwerks can not find the map. Because engine is trying to load file at "../LeadwerksEngine/Projects/Maps/sm.map" It get fixed by adding project name to path as follows (Cube is project name) ../LeadwerksEngine/Projects/Cube/Maps/sm.map" However even so engine loads the map, engine can not load textures and etc within the map. Engine gives errors to read files with path on ../LeadwerksEngine/Projects/Textures/sometexture.tex" What did i make wrong? Could Anybody faced this problem help me?
-
My Card Graphics 9800 gt 1 gb. Windows 10 x 64. 4 gb ram. I appreciate any suggestions.
-
Hello, Because I made myself some thoughts about a saving mechanic for my current project, I searched the web and especially the Leadwerks site for how to save simple game data, like the players health or position. The only kind of useful thing I found which works for LUA was this: http://www.leadwerks.com/werkspace/topic/2103-save-data-to-lua-syntax-as-textcompressed/page__hl__save+data and this: http://www.leadwerks.com/werkspace/topic/1853-howto-using-lua-script-as-data-file/ I actually was able to create a data file and read it into my code with "dofile". However I didnt find out how to create/save a file with lua yet. I searched the Leadwerks API and found the Stream and FileSystem Class. So I tried the following code: function Script:Start() local gamedata = FileSystem:WriteFile("Test.txt") end It didnt work, and I also dont know how it works. Where has the file been created? I searched my PC and the Projectsfolder but couldnt find such a file and I also dont get any kind of error message. I guess this is completely wrong, but I was just playing around, because I don't have that much experience with Lua and Leadwerks. The file you can download in the first thread I posted ("TStoreData.lua") doesnt work anymore and I cant find where he saves data. That you clearly undersand what I want. I would like to do something like this: function Script:Start() local gamedata = {} gamedata.playerHealth = 100 gamedata.playerWeapon = "Sword" gamedata.playerPos = Vec3(10, 100, 53) FileSystem:WriteFile("gamedata.lua", gamedata) end This is just some code that you know what I mean. I know this doesnt work xD. So could you please help me out a little bit . PS.: I kind of understood what AndyGFX wrote in his post, I just couldnt find anything how to save a file.
-
Created a script this morning to load a cylinder with an attached script, however the material does not seem to load for the cylinder, or a cone, shaped CSG. Spheres and boxes load without issue. Not really sure why the materials are not loading, but I am hoping someone could clear this up. function Script:Use(entity) local bottle = Model:Cylinder() local material = Material:Load("Materials/Developer/bluegrid.mat") bottle:SetMaterial(material) bottle:SetScale(0.15,0.65,0.15) bottle:SetPosition(-4.4,1.6,1.9) local shape = Shape:Cylinder() bottle:SetShape(shape) bottle:SetMass(1) bottle:SetScript("Scripts/Functions/PickupHealth.lua") end
-
I'm slowly getting to grips with the game engine and seeing how far I can go with just LUA, so plenty of learning opportunities! I'm looking at how to implement all the functionality I need for an RPG and decided the latest bit was worth sharing. This allows you to control where on the map the player is positioned when the map is loaded. I created TriggerChangeMapPos.lua which accepts a second optional parameter, a target object. If this is not specified then the saved player position is used as previously so this could be used as a drop in replacement for the original TriggerChangeMap.lua I then updated App.lua so that it created an entity list on map load and then searched for the specified entity and copied its location to the players. Pivots are of course excellent for this kind of purpose. The files are TriggerChangeMapPos.lua App.lua