Jump to content

beo6

Developers
  • Posts

    862
  • Joined

  • Last visited

Everything posted by beo6

  1. Don't want to make self advertising as i know it is not perfect, but you can try this script from the workshop: http://steamcommunity.com/sharedfiles/filedetails/?id=401012514
  2. Yeah. the Joint:Slider function changed at some point. here is a fixed version of the Elevator script: Elevator.lua Btw. i didn't noticed anything wrong with your example map too. So maybe you have modified your scripts a bit that this happens? Because it looks a bit that your elevator is still active when you step on it. In my script the elevator is deactivated when it is not moving with setting its mass to 0 which might help there. //Edit: that script there in google drive is really really old i think. //Edit2: just uploaded it to the Workshop: http://steamcommunity.com/sharedfiles/filedetails/?id=510080616 not sure why i haven't done that sooner.
  3. You can try this: https://github.com/luapower/winapi/blob/master/winapi/clipboard.lua but you probably need to disable the Lua Sandbox in the Editor and you will not be able to use this in the Leadwerks Game Launcher. Or i can probably make you a library with Lua ffi, but that will definetly require you to disable Lua Sandboxing and prevent publishing to the Leadwerks Game Launcher. //Edit: here i added it to my small library. https://cloud.software-sl.de/index.php/s/JLiv6hkd9koCLms copy both files to your root directory of your game. (where your exe is) and just add in your Main.lua or App.lua right at the top the line: import("LEAddon.lua") then you can use addon.SetClipboardToText("This will end up in the clipboard") or local clipboardtext = addon.GetTextFromClipboard()
  4. just a small suggestion. the links of the paginator in the launcher - there are only the numbers linked. So you need to hit them pretty accurate. It would be nicer if the whole button is linked.
  5. interesting. yes that executes every time. one thing i liked about loadfile though is that i was able to load the note into a local variable. local luaFile = loadfile(documentPath) self.text = luaFile() i can't think about a way to only use local variables with the other approaches. ( using self.text = {"the text in the file"} ) ends in an error "attempt to index global 'self'" but as long as there is no variablename conflict it should be no problem.
  6. i know. but since loadfile is not possible and io is not allowed in sandbox i am a bit out of better options here.
  7. thanks. i already thought so. i now changed it to use import(). My problem first was that import only gets executed once. But now i just add every loaded note into a table so i can read them later from there. not sure about memory usage there but i guess its not that bad for text only files.
  8. Hello, lxFirebal69xl pointed out that the loadfile() function i used in the Notes.lua crashes the application. I tested it and it looks like loadfile can only load files that are placed normally in the game directory and not inside a zip-file. is this a bug or a feature?
  9. beo6

    Game Launcher thoughts

    but.. but.. i can't upload a Realtime Strategy Game where every unit runs against buildings since they don't know it is there. I thought it is because of their tessellated hair blocking their sight.
  10. 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.
  11. ok. thanks now it makes sence. still GetKeyValue issue on Editor-placed prefabs..
  12. 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") ?
  13. 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.
  14. beo6

    Small Fixes

    still no Prefab fix. :/
  15. 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.
  16. I don't think this will ever come. So you can stop requesting it.
  17. 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.
  18. 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
  19. I would like to see prefabs fixed at least. they seem very buggy at the moment. :/
  20. 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?
  21. 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.
  22. 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.
  23. it should work, and as you see in my report, it sometimes work. but sometimes not. So it must be a bug.
  24. 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.
×
×
  • Create New...