Jump to content

beo6

Developers
  • Posts

    799
  • Joined

  • Last visited

Everything posted by beo6

  1. i hope i understand it correctly what you are trying to do. you can do the following: function Script:CreateNewParent(pName,x,y,z) --self.parent[pName]=nil self.parent[pName] = Model:Box() self.parent[pName]:SetPosition(x,y,z) end after a self:CreateNewParent('yourchoosenname', 0, 0, 0) you should be able to access it with self.parent.yourchoosenname //Edit: if you want to make the current entity a parent of the new one you would have to add self.entity:SetParent(self.parent[pName]) after you created it.
  2. ok. thanks now it makes sence. still GetKeyValue issue on Editor-placed prefabs..
  3. Thanks. Using Prefab:Load("Prefabs/myprefab.pfb", Map.LoadScripts+Prefab.NoStartCall) seems to work. But it feels a bit odd since calling only Prefab:Load("Prefabs/myprefab.pfb") for the first time does load the script. So it is not really clear that Prefab.NoStartCall does completely prevent loading the script and not only just prevents calling the Start function. //Edit: what about that prefabs placed by the editor do not return their entity name with self.entity:GetKeyValue("name") ?
  4. then either no one want to align stuff to the terrain like here: http://www.leadwerks.com/werkspace/topic/8487-question-about-physic/page__st__20#entry66616 or i am just too stupid to find the Leadwerks own function to do that. I really hope it is the second option.
  5. beo6

    Small Fixes

    still no Prefab fix. :/
  6. Entity:SetQuaternion is not documented Entity:GetQuaternion is not documented that Transform:Rotation() accepts Quaternions is not documented. i guess these are the points from Roland.
  7. I don't think this will ever come. So you can stop requesting it.
  8. the big pros about HTML in a game would be that everyone who knows HTML can create it, which are many more than any other GUI library. And you can see how the GUI looks in every webbrowser without needing a build of the game and running the game every time. So debugging is a lot easier.
  9. I get these seemingly randomly but so far only shortly after I started leadwerks. I guess only Josh can do anything about it.
  10. Yes. i know that Thread, i thought it is obvious what the issue is. Sorry about that. Have now created a project where i reproduced the issues. Hope that helps to fix them. https://cloud.software-sl.de/index.php/s/TjuqtGZ3gyWorUC Press the Space key to call the Prefab:Load function. the loading script part is in the gamecontroller.lua script. There are two maps. "callingStartFunctionButEditorPlacedDoesNotReturnName.map" Where the prefab is already placed in the editor. There the prefab that was placed with the editor does not return the Name but the Start function is called. The by script loaded prefabs do return the name and Start is called. "notCallingStartFunctions.map" this one is without a placed prefab in the map. There the loaded prefabs do never call Start. It seems that the Start function is not called when the first load has Prefab.NoStartCall as parameter. Then the prefabs loaded after that do still not call the Start Script even if that parameter is missing or i explicitly set the parameter Map.LoadScripts
  11. I would like to see prefabs fixed at least. they seem very buggy at the moment. :/
  12. Isn't steam just using openid for this? There are many implementations for that already for many forums, cms etc. Not sure about this forum software but maybe one exists for it too?
  13. beo6

    Windows 10?

    whats funny is that most of these things are default in most mobile operating systems already for a long time and no one cares there.
  14. Maybe it's also good to think about reallife. You don't die because your body thinks you have fallen high enough, you die because you hit something too fast. Or else nobody would die if they got hit by a car.
  15. With that code the player would die instantly when for example you have a platform at height 5 or a hill. As soon as the player jumps or falls just a small amount he would die. I thing the velocity test is the best but that depends in how exactly your gameplay should look. To get the correct height above ground you would need to make a constant raycast down from your character.
  16. it should work, and as you see in my report, it sometimes work. but sometimes not. So it must be a bug.
  17. Are you using Prefabs? maybe you have these issues i reported here: http://www.leadwerks.com/werkspace/topic/13055-prefabs-not-working-correctly/ the name key should also be set with the editor name field. No need to set it in code again.
  18. seems to crash for me in Lua. haven't tried it in C++ yet. //Edit: tested a bit more. using local path = "testfile.txt" System:Print(FileSystem:GetFileSize(path)) crashes. using local path = "testfile.txt" System:Print("size: "..FileSystem:GetFileSize(path)) prints "size: 0" not sure why it crashes the other time.
  19. If that does not work, you can try to call it with a lua library. i made a small one with some additional functions. (was mostly just playing around with it) Have uploaded it for you here: https://cloud.software-sl.de/index.php/s/JLiv6hkd9koCLms You have to extract the files where your executable is and add import("LEAddon.lua") to your App.lua or Main.lua at the beginning. Then you can call something like addon.Execute("http://www.google.de") and the default browser is started. It has a couple of other functions but as i said i where mostly playing around with it and not everything will work. You will have to disable sandbox Lua though.
  20. When i use local building = Prefab:Load("Prefabs/Buildings/"..pfbfile) in my script, the Start function is not called and trying to call it manually with building.script:Start() ends with an exception. If i place it in the Map with the editor, the placed entity calls its start script, however GetKeyValue("name") returns nothing. When the Prefab is placed with the editor and i load another prefab with the script the loaded prefab calls its Start function and returns the correct GetKeyValue("name") This issue might be related: http://www.leadwerks.com/werkspace/topic/13048-foreachentityinaabbdo-to-find-entities/ //Edited thread title as there is even a small bug when placing it with the editor.
  21. Hello, here the next bug/feature. If you drag one prefab into your map, and select a material for it in the sidebar: You get asked if you want it to be really no longer an instance. You select OK. Now every time you drag the prefab into the map again, all have the material in the editor visible. It is not in the material slot in the sidebar. I know it probably shares the material on all same models (independend of the prefab) since the model is instanced too. But maybe at least display the correct material in the slot of the sidebar?
  22. If you double click on an entity in the scene list, your views get moved to the clicked entity. This works for most entities i tried. lights, models however if you double click (or select right-click -> Go To...) on a camera entity, you can't move anymore in the Perspective view and the view is blue. You need to go to another entity to fix this.
  23. That happened to me too once. And that is also when I thought that it would be nice if leadwerks would first load files from the directory and only if one does not exist, load from the zip files. Just like every quake engine game does it i know of. Not for this particular issue about backups, but it would make modding easier I think.
  24. beo6

    Ocean shader

    They are not free to use. You can't use them commercially.
×
×
  • Create New...