Jump to content

beo6

Developers
  • Posts

    795
  • Joined

  • Last visited

Everything posted by beo6

  1. The script does work with N points. It might give issues with less points though.
  2. Exactly the same issue I had here: http://www.leadwerks.com/werkspace/topic/13175-lua-loadfile-not-working-with-zip-files/ I think you need to forget about trying to stay local with files that are loaded at runtime unfortunately.
  3. changing that setting does not seem to do anything for me. Is it working for you?
  4. Or another idea which I liked in some older games. The menu where already ingame. I can remember an arcade bowling game where you controlled the bowlingball and selected the level with the game controls. Or another example even though it also included a normal menu is Portal 2 coop where you land with your partner to select a level.
  5. haven't tried it, but i guess it should work that you export the terrain as *.raw file, open it in an image manipulation application that can open it, make the image bigger so it fits, save and import it into a 2048 terrain.
  6. There is no --out. it was in a couple of scripts, and is still sometimes in my scripts but the proper way is self.component:CallOutputs("Outputname") --out does nothing really as far as i know.
  7. it can't at least directly. But you can do it with 3 functions. 1. the argument function: function Script:something()--arg return "Hello" end 2. the output function: function Script:Use() self.component:CallOutputs("Use") end 3. the receiving function: function Script:Receive(yourvalue)--in System:Print( yourvalue ) end now just connect the use function with the receive function and drag the something function to the argument point in the flowgraph. //edit: just like in some of my scripts. For example this: http://www.leadwerks.com/werkspace/page/viewitem?fileid=510080616
  8. I noticed with vectronic that all objects appear pretty late when rotating the camera. Late enough that I thought for a moment that the room became empty.
  9. if DrawText is really slowing something down there is definetly something else wrong. Why should writing text be so hardware intensive?
  10. have a look at this thread: http://www.leadwerks.com/werkspace/topic/12374-multiple-text-gui/page__hl__line%20break
  11. 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
  12. 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.
  13. 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()
  14. i have seen many games that just pause when minimized. Even when only out of focus and in background some of them pause.
  15. 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.
  16. 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.
  17. i know. but since loadfile is not possible and io is not allowed in sandbox i am a bit out of better options here.
  18. 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.
  19. 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?
  20. 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.
  21. Just wanted to try my Notes script again from the Workshop but i always get --------------------------- Leadwerks Editor --------------------------- Failed to download Workshop item. --------------------------- OK --------------------------- i already unsubscribed to all items since there where some in the list who had no name anymore. After that i tried to delete everything inside the "SteamApps\workshop\content\251810\" folder which seems to be the downloaded workshop files. after i resubscribed to the notes script i found the notes script inside a bin file which can be opened as a zip file. (which is why i know it is the correct notes script) so it got downloaded correctly. Even creating a new project, pressing install ends in the mentioned error. ending the subscription and resubscribing does not help. and leadwerks + steam has all write rights to the projects folder. same with the camera dolly script. other workshop files do work. (at least the ones i tested) looks like it only happens with my own workshop files?
  22. 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.
  23. ok. thanks now it makes sence. still GetKeyValue issue on Editor-placed prefabs..
  24. 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") ?
  25. 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.
×
×
  • Create New...