Jump to content

Rick

Members
  • Posts

    7,936
  • Joined

  • Last visited

Everything posted by Rick

  1. Both versions will be the same in terms of features like this. Everyone needs to stop thinking that the Lua version is gimped because it's not (99% of the time)
  2. Models need a shape file. Remember you have to right click the mdl file and select Generate Shape, then you have to select that shape from the models physics tab. Then set it's type to scene.
  3. How does App.lua know what 'truck' is? App.lua doesn't automatically get variables by the name of what they are in the scene. So what you are doing in App.lua with truck variable won't work the way you think it will. All that stuff should be in your truck script. Remember you can access the window created in App.lua inside any script via App.window. So in your truck script you should have all those checks for buttons being pressed and instead of truck variable do self.entity (which because it's attached to the truck model will mean the truck in your scene). Remember that 95% of the time you won't even touch App.lua (at least when starting out). Use the entity scripts as self contained little programs that control entities they are attached to.
  4. Can we see the entire script? What is speed? If it's a parameter to the script you should have self.speed not just speed. You are also passing speed to the x axis, where I would think you'd want to pass it to the z axis (forward/backward). Also note that Move() doesn't use any physics. If you would want to use physics you'd probably want AddForce(...).
  5. Yeah, that would be the manual way. I was hoping LE set a key of the entity automatically as I would be using this for saving/loading of dynamically created prefabs. It would have just been less work for the user of the save/load script to not have to do that for every prefab that they create dynamically.
  6. Does anyone know if there is a way to tell what prefab an entity was created from? Like the actual path and pfb file or do I need to track that myself? I was just hoping maybe Prefab:Load() added a key to the returned entity like "file", "Prefabs/Characters/zombie.pfb" or something. I think this would be handy to have if we don't already.
  7. @YouGroove, I don't think that's the problem. I think the problem is Josh only has so many hours in a day and right now he's working on getting Leadwerks running on Linux. Yes, this is a minor annoyance but it in no way breaks the engine or makes the workflow horrible. This is a very minor thing that has a "work around" at this time.
  8. @YouGroove, the executable that fires up when you run the game is reading in the map you are working on. The map file has to be saved in order for the executable to read your changes to the map correctly.
  9. @YouGroove you said You said the new script that you are attaching to the ball is the code below, which you then say is for rotating the table. If you attach the script you have to the ball then you are rotating the ball not the table because self.entity in that script refers to the ball (because it's attached to it) and not the table. Attach that script to the table and not the ball and you should see the table move.
  10. This looks interesting but I notice you are lifting your right thumb up to move back and forth. I can't believe this precision is the same as a mouse though. Probably closer than a joystick, but it just doesn't see to be the same. Maybe more like a trackball?
  11. In my videos I more hope to show ideas on how things can be done than to be a code copying thing. Most of the scripts I have used for the tutorial have been very small and actually I copy from the wiki that collision script on most of them and just make small modifications. It's really about typing things out yourself, experiencing issues and fixing them to learn. I make these tutorials more for learning than to just give out scripts. If I wanted to do that I would just put them on the asset store like I have some other scripts, but these are more about learning and my thought process as I do this for others to see.
  12. checkpoints have nothing to do with all the data you have to save. all a checkpoint is, is an area that tells your game to save the data it needs to, but you, the coder, has to decide on how that's done. checkpoints aren't magic saving things
  13. Not sure why you think a checkpoint makes it any easier than any other option like pressing a button or F2 or something. The hard part is more around what to save and load vs what starts the saving/loading process.
  14. I'm going to make this tutorial, but it's going to be made for people who own the software. I would suggest you buy the software if you are doing to use it. As far as the task goes, note that we can't save the map format as it exists. All you can do is save information about the map/entities and then set their information one start up.
  15. @Georjack. Yes, you can. There are functions and ways to do this. Leadwerks gives you the functions to save date to file. Every game is different so you have to decide what state/data you want to save off and do that yourself. I think this will be my next tutorial because it's coming up more.
  16. I think it would be nice to not include the path up to the project folder since we know what project we are running anyway. That information is basically useless and not needed.
  17. By all means Dude. The more the better. Just let me know and I can update the first post.
  18. Updated with enemy spawning on the first page http://www.leadwerks.com/werkspace/topic/8103-gameplay-tutorial-requests-here/ Quality is a little crappy, but I'm not sure why
  19. At this time Josh would have to figure out what's going on.
  20. Did you forget how to quote on the forums YouGroove
  21. You don't want to call the Start() in Draw() because Draw() gets called every frame (or so) and you only want Start() to be called once the object is created. Not sure what you mean by hiding it and can't be pushed. If you create and move in the same frame they won't see it moving. It'll just appear instantly. Where you want to place the enemy is up to you. There are a number of ways you can do it.
  22. I was planning on making a enemy spawning tutorial tonight actually. Will have something up later in the evening. Drag the model in your scene somewhere where the player can't see it. That acts as a preload. About your error, it sounds like the Start() function isn't getting called since that's where the animation manager is created and the error you are getting is telling you the animation manager variable is null. Are you loading the prefab enemy? If so, just to be save you could call it's Stat() with obj.script:Start(), but Josh has said he fixed this, but there may be an issue still.
  23. And you have swept collision checked?
  24. Is your floor a plane (is it very "skinny"?). I ran into issues when models didn't have back faces, to save on poly count, and collision. I either created CSG for the collision and painted the invisible material on it so the visual model is all that's seen, or you can make a collision model that has a little more thickness and use that.
×
×
  • Create New...