-
Posts
438 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Haydenmango
-
Ever since the texture locking update I will occasionally be locked out of editing my entities general values. Can be seen near the end of this video around 3:20 -- https://www.youtube.com/watch?v=ppHJhwTrsD8
-
Maybe the terrain scale is to high? Look under properties in the terrain tab if you're not sure where to find that. I am not sure what else it could be. edit- I also get black dots on my grass terrain. I don't use a normal either.
-
When an entities View Range is set to Far,Medium, or Near they will not have any shadows if I am using a Directional Light. If I have a spot or point light they will have shadows regardless of view range. Video -- https://www.youtube.com/watch?v=ppHJhwTrsD8 --edit I tested this on a new a map with the same pine tree model seen in the video but in my new map I can see the entities shadow regardless of its view range setting. Maybe my map is just bugged?
- 2 replies
-
- Lua
- Directional Light
-
(and 1 more)
Tagged with:
-
Not sure if this is intended but Near View Range gives my entites No Shadows even though I have turned their shadows to static ( even through scripts). The only way I can see their shadows is by setting the entites View Range to Max. My directional lights view range is set to infinite. I have tried using all different lighting settings (static,dynamic,static+dynamic,etc.) and also have tried turning changing my worlds light quality by throwing self.world:SetLightQuality(0-2) into my App.lua scripts Start() function. I also can say that turning my entites view range to near (in the editor) only works on entites that don't have a parent. If they have a parent it won't work in game(but it will show in editor) even if I set the parents/parents children view range to near. --edit both of these issues have been fixed! hurrah!
-
Oh wow! So I used self.entity:SetViewRange(Entity.NearViewRange) in my entities Start() Function and it worked!!! I guess all this time I have just been turning the visibility to near in the editor. Awesome. Problem solved it seems.
-
That sounds extremely convenient/useful Josh. I may wait for that before making a LoD system. For now what do you think would be the best way to do a more specific View Range system? By specific I mean I could set the view range for each object to a set number instead of Near,Medium,Far,Max, or Infinite.
-
Sadly all of my entites view ranges are already set to near (in the editor). Does setting view range for entites in the editor also set it in game or would I have to use the function in a script? I can still see all of my entites with a near view range from 300 units away. My Cameras View Range is set to 300 (instead of 1000) and I can see my trees all the way up to where the camera range cuts off. I would probably like the range to be about 100-150 if I could figure it out.
-
Thanks for your thoughts guys. @Charrua I hadn't thought of gathering my entities info at the inital map load I may give it a try although I am using Lua. @Rick I am trying to do a slightly different LoD system; it's actually more like a view range system. I don't have different LoD models for everything in my map (I may eventually) but for now I was just trying to make entities a certain distance from me Hidden and then the entities within the distance Shown. I guess I could give all my entites scripts but my worry is they all would be constantly calculating their distance from me instead of me just calculating my distance to them. Am I going about this in the wrong direction? Should I use a collision box or something similar for my "View Area" or would calculating distance to/from each entity better? I will give that thread another read through, there are some helpful tips in there.
-
Hey everyone I have been trying to make a LoD (Level of Detail) system lately but I am running into one big issue. Using world:ForEachEntityInAABB() or world:ForEachVisibleEntityDo() works to hide the entity but then I run into my issue. These functions will not return a Hidden entity. So how would I go about 'finding' a Hidden entity? I know I could give each entity a script and make them check for my player when they are hidden but that doesn't seem like the best way to go about doing this. Any other ideas are welcome.
-
Personally I learned the most through looking at documentation examples and examining the scripts that come in the start map.
-
http://www.leadwerks.com/werkspace/topic/9883-introduction-to-lua-scripting/ Is a good place to start. Also in the tutorial section there may be some other things you could use. http://www.leadwerks.com/werkspace/forum/89-tutorials/
-
Just started getting this error after closing and reopening my project I am working on. Now every time I open the editor this error shows up. Video-- https://www.youtube.com/watch?v=7IPqD4OchVE&feature=youtu.be Microsoft Windows 7 Home Premium Intel® Core™ i5-3230M CPU @ 2.60GHz GeForce GT 630M --edit After deleting the mdl of the last object I was working with everything has gone back to normal and I no longer get this error. I think this is connected to changing an entites script parameters (like Script.MyEntity = nil --entity "MyEntity") because that was the last thing I was doing before this error occurred.
-
EXCEPTION_ACCESS_VIOLATION problem
Haydenmango replied to Freddie Roach's topic in General Discussion
Just started getting a variation of this. I am going to post a bug report with a video. -
Can Climb Steep Terrain Wall
Haydenmango replied to gamecreator's topic in Leadwerks Engine Bug Reports
Hm well I am not completely sure if this is related but my game I'm working on using has like 20-30 character controllers that travel on terrain and it lags pretty hard. The only thing I have found that increases my fps is deleting/hiding some of my character controllers. -
That looks great tj! I really like the look of the world. Watching your progress is inspiring.
-
It is the most awesome thing ever!!!! Keep up the good work.
-
Yeah if I worked on it I could make my weapon system use that type of method. Using a pivot as a placeholder could be a very good idea as well. Anyways I look forward to seeing your video if you decide to make one.
-
Hi there. Recently I have been working a lot on one map and it hasn't come to my attention until now that I am unable to create or open another project. I have recently joined the workshop beta and I am running Steam Indie Edition. I attached a video that shows the behavior. I am not sure what to send to you as none of my projects except for one work but let me know if you need anything and I will send it your way. --video https://www.youtube.com/watch?v=iBw2hCEQ0iM
-
Using Instance() I respawn my animals and weapons so far. It works great for my open world survival game! Simply hiding objects when they die and then switching their location and showing them when they respawn seems to work in most cases but I instance my animals because they go through a complex script that would be hard to reset by Hiding and repositioning them.
-
I think it carries over the init variables at the top as well! Almost all of my entities load through Instance() after my game initially starts and I noticed that you do have to call spawn.script:Start() when the entity is instanced because that will not run otherwise but other than that everything (in the entities script) seems to carry over. A cool trick for respawn time is to Hide() the dieing entity and then wait a set amount of "respawntime" then call a custom Death() function that Instances your dieing entity, reset the script values(for the instanced entity), Show() the instanced entity, and release the dieing entity.
-
Yes it works as it should when instanced. I believe instance seems to copy the entites script as well as the changes made to it. If you have a script like- Script.health=80 then your entity dies because its health reaches 0 and you want to respawn it- self.entity:Instance() self.entity:Release() this would create another dead entity because its Script.health is still equal to 0 which would then loop this death code and probably crash the game. you would need to do this- local spawn=self.entity:Instance() spawn.script.health=80 self.entity:Release() now your instance will spawn with 80 health. You also need to set the instances position I believe. That is how I have been releasing and respawning entities so far.
-
Well that ties into the actual issue I posted about. The code above was my workaround to get rid of the physics shape my "dropped weapon" inherited from its parent. Creating an Instance of the "dropped weapon" got rid of the unwanted physics shape. I then release the "dropped weapon" so that the instance of it I created pretty much replaces it. So in this case I do not want the entity back into the world because it has its parents physics shape which I do not want it to have. I had to create a instance of the entity (which magically gets rid of the unwanted physics shape) to fix my issue.
-
No it is the whole weapon. I happen to do self.entity:Release() quite often and I thought it worked. What would be the proper way to release/destroy an entity then?
-
Will do. Just making sure I wasn't missing anything obvious before I post a bug report. --edit for now I found a fix. still posting a bug report as it doesn't solve the actual issue. function Script:Drop() self.entity:SetParent(nil) self.entity:SetMass(self.mass) self.entity:SetCollisionType(Collision.Prop) self.entity:SetShadowMode(1) local spawn=self.entity:Instance() spawn:SetPosition(Transform:Point(0,0,1,self.entity,nil)) self.entity:Release() end