Jump to content

Rick

Members
  • Posts

    7,936
  • Joined

  • Last visited

Everything posted by Rick

  1. This looks like it's working actually. Not sure what I was seeing before. The name issue is still there.
  2. From what I'm seeing if I make a prefab with a script and just a pivot. Then remove it from the scene and drag the pfb in, and make it a child of some entity, and try to use FindChild(name) it fails because the prefab has nothing for a name key/value. I see this by looping over the children of the base entity. Prefabs just need work. A good amount of weirdness to them it seems.
  3. Interesting use for coroutine. Never thought of a one time shot usage for that.
  4. Im confused. Is this a fake loading bar? As far as I know Map:Load() is blocking as it loads the map from file. Why put it in the coroutine function?
  5. I have prefabs (pivot w/ script) as children to another entity. The Start() on the child prefabs aren't getting called (these are placed in the map). I have to call them manually. I guess I would expect any script attached to anything to have it's Start() called. Seems like some recursion is needed on the map load. I'm using 4.4
  6. Rick

    LUA CPP "how to" 7/7

    Why are these showing up as new on my timeline now?
  7. You said in your original post "Josh, or anyone else with first-hand understanding of this topic, could you provide some insight to this". Since josh didn't respond and not many people have first hand experience with making game engines or terrain system, this would explain why you didn't get any answers. If you want people who don't really have any real experience give thier opinions you would have gotten a lot of responses i think UE4 allows streaming terrains? LE does not. It's a lot more simple when it's just one terrain for the entire game vs having to stream terrains in at runtime and manage all that goes with that.
  8. But creating unique instances of the material won't matter. It's the model and all instances of it that points to the last material that's assigned to it. When you set any material on an instance of a model all instances will get that material. It's the model that is saying all instances of myself will point to the last assigned material on me. That's why you have to copy the model or load it at runtime with the unmanaged flag to make that model not share materials. So simply loading unique materials in start won't give the desired effect since all of those models are still instances when placed via the editor. In that case whatever script was last to run will set the material and all instances of that model will now be sharing that material.
  9. All instances of a model placed in the editor share the material no matter how it's set. So it doesn't matter where or how he sets the material for this model, whenever he set it's for 1 all instances will automatically change as well. The same model placed x times in the editor are setup to share the same material. To get different materials for the same model you either have to make it in code because then you can control that setting or use an atlas shader that mimic different textures. For an atlas shader it still uses the same material but per instance you can control what part of the atlas texture to use which results in different textures on that model. In this case he can just use the shader Mack provided since he's not really looking for completely different textures. If you had a character and wanted them to seem like they are wearing different clothes or textures then an atlast shader would be one way to go vs making copies as you'd at least save on the model memory and speed of loading if loading a new one in real-time since they are instanced vs Copy() which reloads a new instance which takes longer and can't be used in real-time.
  10. Shaders always come to the rescue if you know how to use them
  11. It might be in an infinite loop. Since this entity has a script attached that copies itself inside Start() it's copy might be calling Start as well making another copy rinse and repeat. Put a System:Print() at the start of Start() to see if s bunch show up. if that's the case there are ways around this.
  12. Can you show the entire script? With those three lines what line does the crash happen?
  13. Martyj kind of asked 2 different questions. First it was picking only, then it was about removing individual instances. Isn't there a collision type option for trees already? I would think picking would work right now.
  14. See Josh's response a couple posts down.
  15. All a decal needs is a surface to be applied to. It doesn't mean it's an individual model. I just don't recall if they are all combined. I thought I recall a post where he mentioned a group of them are combined into 1 model. Nobody is saying it can't be done (Josh had an idea on how to do it but just didn't have the time), but Josh would be the one who knows the details. Maybe send him a private message about it.
  16. The copy and swap isn't a lot of code really. You'd attach a script to one of these things and inside its Start function copy self.entity where it's materials aren't shared and then set its position and rotation to what self.entity is and then hide self.entity. Save as prefab and place as many as you want. Might not be the most efficient way though but it's a couple lines of code only. The shader way is probably the most efficient way but more complex. Id it would be nice if josh offered a flag for each model if it's material is shared between instances or not.
  17. At one point josh said this wouldn't be possible currently. Something about the vegetation not being real individual entities but combined in some way for speed purposes. So there was no way to single out an individual veg item. It was meant for visuals only not heavy interaction which does make its use limited. Or perhaps it was about the placement map couldn't be modified. Something like that. I was hoping for this back in the day too for a survival type game.
  18. It feels like there is possibly some kind of leak in the editor for emitters. When I'm playing around with emitters settings in the editor in real-time renderer mode, after some time of changing values over and over the FPS in the editor goes from 60 to about 15.
  19. Because materials are shared between model instances to save space. If you use the editor to add models you can't get around this as that's what the editor does. If you can load a model in code you can control this behavior and tell it to use it's own material via the Entity:Copy() function I think? Once of those has an option to use it's own material. Clearly you'd want to place these in the editor so you know where they are, so maybe a workaround would be in it's script do a copy on the entity itself in the Start() function and replace the editor model with your new copy while setting the pos/rot of the new copy unshared material model to the one you placed in the editor and hide/release the editor version. So basically the editor version of the model is just acting as a placeholder for it's position/rotation to the one you load in code.
  20. Yeah, you'd for sure want C++ for that
  21. Can't use C# at this time. Someone could make bindings and people have I the past but LE doesn't support it so it's hard for those people to keep up with changes and bug fixes for the bindings. Yiu can use any library you want on the C++ side. You'll have to set them up. I would highly recommend Lua though. It's far more flexible and much easier to deal with than C++.
  22. I haven't been able to. I think josh removed require() ability which almost all external modules use. I've used some Lua libraries but I've had to modify them which is a pain but doable.
  23. Yeah sorry for the poor explanation. I did mean that you just have to do a ton of stuff and throw it out into the world in this industry so being insecure about your stuff doesn't help you much in the game industry.
×
×
  • Create New...