-
Posts
7,936 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Rick
-
Does that work if you have multiple in your game running at the same time? Seems you are just using the 1 Timer table. I can't recall if setting a table to another variable makes a reference to the original (I think it does) or a copy. If you look at AnimationManager.lua you can see how Josh makes a new copy of the class template. It's pretty close to what you have but slight differences like in Create() you just make a new table and assign the variables to that table and then loop over the Timer table getting it's functions and adding them to the new table as well. This will then return a completely separate instance of the class vs I think yours will always return the same instance (Table). Just something to watch out for. Put the below code in http://www.lua.org/cgi-bin/demo to see what is happening. You are returning the 1 Timer table vs making a copy of it. Timer = {} function Timer:Create(interval) local timer = Timer timer.interval = interval return timer end function Timer:Update() self.interval = self.interval + 1 end local timer1 = Timer:Create(500) local timer2 = Timer:Create(500) -- I update timer 1 timer1:Update() -- put timer2 will show 501 because both timer1 and timer2 are pointing to the Timer table. they aren't their own instances. they are "pointers" print(timer2.interval)
-
http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/context/contextdrawimage-r721 The above is what you'll be using for making a GUI in Leadwerks. You make gui like images and draw them with the above. How you draw them matters because of aspect ratio and screen resolution as well.
-
Are those porta potties in the background Looks good
-
The first time I tried downloading this specific one was a week or 2 ago and I got the same thing then.
-
Found a cool lua tweening library so thought I'd share it https://github.com/kikito/tween.lua
-
Nothing in C:\Users\Rick\AppData\Local\Leadwerks\Leadwerks.log. C:\Users\Rick\AppData\Local\Leadwerks\Workshop\251810 only shows other ones I've downloaded. Just tried the Chair model that shows up on the first page of the workshop and that worked. Not sure why the SSAO one doesn't install.
-
I open up Workshop from the LE Level Editor. Click something (Igor's SSAO for example) and click install and I get an error message "Failed to install Workshop item". It's shows I'm subscribed to it but won't let me install it.
-
Found how to set the code via the api and now the bug is gone. Next steps: Fill out the menu design Console/warning/error tabs in lower panel Track changes (show * in tab of file) Save, Save As, Save All Delete files Enable debugging (this will be the hardest part of the entire thing I think) Autocomplete Function parameters
-
Yeah, I identify the editor as just an id on a div and the code is text inside the div (that's how I do it anyway). Which for sure would be the issue. I'm not sure if there is some ace javascript function that I can add the code to that would clean it up for displaying. I'm guessing there is a way to do that. Haven't looked into it yet.
-
@nick I'm loading the interiors in Lua at runtime on the main thread. As far as my experience has gone you can't load entities on another thread and have it work correctly in LE. When the game starts we load 1 instance of every model and then hide it as a precaching method. Then when you load the same model again it's near instant. However, we are noticing a slight delay still with loading interiors but haven't looked into it. We could be either missing a model in our precache setup or the amount of models in the interior is getting to a size that even loading instances is noticeable. If that's the case then I'll have to setup some means to load the interior and it's props over multiple frames.
-
Not enough people bought the mobile versions.
-
In Dead Anyway you can loot almost everything for supplies. Each of those containers has a list of inventories so we will store those in a SQLite db. Plus other things to do with the saved profile. So basically anything that needs to be saved.
-
Nevermind found one with binaries that work. https://code.google.com/p/luadbi/
-
Has anyone gotten sqlite working in lua for windows? I see some libraries out there but none seem to have binaries and they all want you to use this luarocks thing which for windows just seems like a pain in the *** and seems to be more unix focused.
-
Yeah I see an email saying the activation email isn't working? Is this the first time you've tried looking at it? I wouldn't think you need to sign up to see it.
-
So I've recently discovered node-webkit and thought I'd give a crack at making a code editor that could be used with LE (and ideas for editors that have leadwerks 3D aspects later). This editor runs on linux, windows, & mac and only has 1 code base for the editor code itself. Personally I think this could solve a lot of editor issues with LE that we seem to have and simplify the process for Josh. One could hire any web developer off the streets to create whatever look and feel one would want. It could open up the door for easy plugins as well. I just think this has some cool possibilities myself. I think node-webkit is the future in desktop development. The OS has just been made irrelevant (that's my tag line for node-webkit ) http://youtu.be/r7xIDoMH-4c
-
Yeah, you may be doing something in a loop that turns out to be an infinite loop which would eat up all memory, but we'd need to see some code.
-
You don't want to do what you are doing there. You make those variables global and that's a bad idea. In options.lua change to self.postfx and self.AA then in fpsplayer read them in via options.postfx and options.AA. You see you are passing in the options.lua script to the players OptionsLoaded (self refers to the script itself). So inside OptionsLoaded the parameter variable 'options' now refers to the options.lua script.
-
The interior prefabs includes the interior structure along with all props. So we can make more than 1 prefab with the same interior structure and different prop configuration to also make variations. Being top/down we don't use LOD we just set the view range to medium or far I forget. Since the camera can't see that far then those houses far away won't be drawn at all but that doesn't matter as the camera can't tell that anyway. Yes, Tj does a great job!
-
? That's usually a dangerous thing since now it would be global. Can you post what you have because I wouldn't think you'd have to do that.
-
No I think I get it. So basically you used an entity in menu.map called optionsmenu and you want to load that data inside fpsplayer in outside_real? The system isn't really setup that way. It's setup so that the entity name that saved the data is the same entity name that can load the data. If I recall on load it cycles through all entities getting their name and tries to find that name in the saved file to get the data. So this means in order to load your data inside outside_real: 1) make a pivot and name it OptionsMenu. 2) Attach a script and inside here is where you place your load function that my script will call. Set those loaded values to script variables. 3) If you want to then inform the player of these values when you get them then in fpsplayer.lua add an entity script value (Script.options = nil --entity) and drag the OptionsMenu pivot into this slot. 4) Now in the OptionsMenu script make a script variable of the player (Script.player = nil --entity) and drag the player on it. 5) Create a new function in fpsplayer.lua like (function Script:OptionsLoaded(options) end) 6) In OptionsMenu in the data load function after you've set OptionMenus script variables with what was loaded you can then call this players script since you've linked the player to this script (self.player.script:OptionsLoaded(self.entity). 7) Now inside fpsplayer.lua's OptionsLoaded() you can get that entities values fpsplayer.lua ------------------ Script.options = nil --entity function Script:OptionsLoaded(options) -- now you can read the settings like options.postEffects or something end Options.lua (attached to a pivot in outside_real map) ---------------------------------------------- Script.player = nil --entity -- note I don't 100% remember what the function name is supposed to be called for loading data so it would be whatever it's supposed to be function Script:DataLoad(data) -- read in all the data that was saved self.postEffects = data.postEffects -- tell the player about this data now self.player.script:OptionsLoaded(self) end Basically the name that saved the data is the only name that can load it. So this is a way to do that
-
Mostly models now as I recall. Tj does all the modeling but the idea is having some external hulls that can have different interior configuration hulls to give variety while saving dev time. All interiors are actually loaded/unloaded at run-time as the player gets in range of the house too. Since we want are map to be very large with a lot of houses this helps with memory/entity count in both the editor and in game. The exterior has a script that tells us what interior prefab (in which all props are in also) to load. The interior collision is all there in the editor at design time though so we can generate the navmesh and characters can move around inside as if the interior was there. We do this because characters are moving around all the time even if they aren't in direct range. That and we don't have to screw around with the navmesh at run-time.
-
As I recall the entities need to have unique names and if you saved some entity in 1 map and want to load it's data in another I think you'd need to have that entity in the other map named exactly the same. So basically make a pivot named OptionsMenu in your other map and put the loading function that's required and set it up. It won't need to have all the functionality that your real OptionsMenu had in your other map, but it's just a placeholder pivot so you can load the data for it. I hope I'm understanding the issue. Do those scripts even exist on the site anymore? Can't seem to find them. I haven't looked at this in some time so wanted to refresh myself but can't find where it is.
-
Those are the details that we are currently working out. We have some ideas floating around.
-
Yep, the inventory system is our own custom system. We wanted to make sure players couldn't just carry a ton of resources. It's not perfectly realistic but we wanted it to be somewhat real in how much you can carry. We also will add weight that affects your move speed slightly.