-
Posts
7,936 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Rick
-
So in FPSPlayer.lua in Script:Release() (which I thought it should be Delete() now, but I see both Release() and Delete() work) if you comment out the releasing of the listener and flashlight the program doesn't crash anymore. So something with releasing those 2 entities causes the crash.
-
That's what listener does I believe. What this post is about is having enemies "hear" sounds.
-
game crashes with no stated reason upon map switch
Rick replied to imjustacowlol's topic in Programming
That doesn't matter. Changes were made to the engine and the FPSplayer script stayed the same causing some issues. Look in your output after the crash. Does it say it's deleting some things at the end of it? If so that means it started to clear and when it hit the fpsplayer it bombed. You can test this by taking out the player in your scene and put in a basic script where when you press a key it calls it switches the map. After I did this it doesn't bomb anymore, meaning the player script is causing the issue. -
game crashes with no stated reason upon map switch
Rick replied to imjustacowlol's topic in Programming
You have the same issue as KTy. In your ShouldSwitchLevel() change self.world:Release() to self.world:Clear() and remove the creation of the new world. It should work then. If you get errors still it's probably because of the FPS script you might have in your scene. -
Note that Release() is the wrong script function name. This was update in one of the patches. It's Delete(). Change the name in the FPS script from Release() to Delete() and see if that helps. http://www.leadwerks.com/werkspace/page/documentation/_/script-reference/
-
game crashes with no stated reason upon map switch
Rick replied to imjustacowlol's topic in Programming
I'll test it out tonight. It does work so there is just something wrong with how you have it setup I'm thinking. -
game crashes with no stated reason upon map switch
Rick replied to imjustacowlol's topic in Programming
Are you opted into the beta? -
So as is this did crash for me. It looks like it actually has something to do with the player entity. I removed the player, then made a basic script and attached it to the floor. This script changes the level using the same App:SwitchLevel() if the 'L' key is pressed in the UpdateWorld() function and it worked fine. Something to do with when the engine does to free the player. I don't have enough time right now to dig into the player script, but it's for sure something in there that's causing issues. Maybe create a Script:Delete() function (this is what the engine should call when it's freeing up the entity) and free some resources that were loaded in Script:Start()?
-
game crashes with no stated reason upon map switch
Rick replied to imjustacowlol's topic in Programming
What LoadLevel.lua file? I think klepto or something had one of these in the asset store that tried to do this inside an entity which will cause a crash. I can't download that big of a project man. You have to do a test app that is smaller. -
Are you sure this is a bug now? From the log it looks like it's starting to clear the world (all the deletes). Did you try this with a very bare min level?
-
And how do you think this would be done in Leadwerks? My guess is very similar to the AABB and distance checking method that you could do manually. I wouldn't hold your breathe for this.
-
Leadwerks for non-Ubuntu Linux, Arch / Fedora.. etc
Rick replied to Neuro's topic in General Discussion
I would think if you could get it to work then it works, but don't expect the developer of LE to support every Linux version under the sun although I'm sure he might help a little if you have specific problems. Basically that would mean buy at your own risk. -
I wouldn't think you'd actually use any sound data for this. I would throw a custom AABB around your player and loop over every entity in the AABB (ForEachEntityInAABBDo) from within the player UpdateWorld(). Track some kind of sound volume variable and if it is high enough alert the enemy entities that are in the AABB. You could also do distance checks for each entity found in this bounding box and based on the value of the sound volume/strength and the distance decide to alert that enemy entity or not.
-
That's a better error as it looks like it's unloading the map. There is a bug report forum. It's very unstructured. You just make a forum post in the bug forum and explain your bug and attach your zipped project
-
I would if I were you. I would make a small test project just for this and include that in the bug report as well. List out your specs and make sure you have the most current version (I'm opted into the beta as well). Yeah, what you experience with the lag is because all the entities in your other scene are still there. They weren't removed because your world wasn't cleared. It's a huge memory leak to do that.
-
http://lua-users.org/wiki/UnitTesting I've never used it but a google search has brought me to that site. Might be a pain when dealing with graphics.
-
Just a note if you Clear() the world you don't need to create another one. You are reusing the current world so you can comment that line out. Other than that I don't know what to tell you. This all works for me. I just tested the below and it works perfectly. function App:ChangeLevel(newLevel) self.newLevel = newLevel end function App:ShouldChangeLevel() if self.newLevel ~= "" then self.world:Clear() Map:Load(self.newLevel) self.newLevel = "" end end --This is our main program loop and will be called continuously until the program ends function App:Loop() self:ShouldChangeLevel() -- all the other stuff I just didn't want to paste here end
-
Did you step through the code that changes? Do you know exactly what line it's failing on?
-
Put a System:Print("Map file = "..self.mapfile) inside your if statement in App:LevelCheck() and run the program and see what it says in the output.
-
self.world:Release() This changed. It should be self.world:Clear() now
-
Yeah, I would prefer that the default LE Lua editor have code completion but if we aren't going to get that and these guys want to go off and make their own editor with code completion, then it would be nice if LE allowed them to hook into the debugger so we can step through code inside their editor AND be able to configure what editor to open when the "open script button" is pressed from LE so we could choose their editor instead of the default LE one.
-
@OP Anytime you see an error that says that (replace that function name with whatever function you are trying to call) it means the function doesn't exist in Lua, meaning it's not exposed to Lua. That's either an error on Josh's part for not exposing it, or the documentation error for saying the function exists.
-
The log shows everything loaded in the last scene. If I have to manually specify the files then I'll just go and delete the files manually from the project so I'm sure I see value in an app that I have to manually specify what to keep.
-
Good idea. You should be able to look at the Leadwerks.log file to see what gets loaded. It's located in: C:\Users\[userHere]\AppData\Local\Leadwerks\Leadwerks.log for windows It only stores the last build so before using this cleaner the person would need to make sure their last build was the project they want cleaned. I think you want to only include anything that has "Loading" on the line. Initializing OpenGL4 graphics driver... OpenGL version 440 GLSL version 440 Device: GeForce GTX 650/PCIe/SSE2 Loading texture "E:/GoogleDrive/Phobia/Materials/Common/bfn.tex..." Loading shader "E:/GoogleDrive/Phobia/Shaders/Editor/terraintool.shader"... Loading shader "E:/GoogleDrive/Phobia/Shaders/Editor/wireframe.shader"... Loading shader "E:/GoogleDrive/Phobia/Shaders/Editor/solid.shader"... Loading shader "E:/GoogleDrive/Phobia/Shaders/Model/default.shader"... Loading shader "E:/GoogleDrive/Phobia/Shaders/Editor/grid.shader"... Loading shader "E:/GoogleDrive/Phobia/Shaders/Lighting/ambientlight.shader"...
-
Animations on models from 3DS Max to Leadwerks
Rick replied to SlipperyBrick's topic in Game Artwork
I assume you can put bones in the model and remove whatever sort of other animation system it's using.