Jump to content

Search the Community

Showing results for tags 'Lua'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Blogs

  • Development Blog
  • Canardian's Blog
  • Beyond Civilization Blog Ext
  • Tyler's Blog
  • macklebee's Blog
  • B-Byrnes' Blog
  • Marleys Ghost's Blog
  • omid3098's Blog
  • Richardsimpo123456's Blog
  • DJDD's Blog
  • Rick's Blog
  • --
  • xtreampb's Blog
  • Economically Disadvantaged
  • klepto2's Blog
  • Old Blog
  • Chris Paulson's Blog
  • Davaris' Blog
  • nil
  • Rekindled Phoenix's Blog
  • Flexman's Blog
  • Kattemaksu Online
  • Marcousik's Creations Blog
  • EVE LBS Studio
  • Rendering puzzles
  • Screen Size Utility
  • Niosop's Blog
  • 1299 RTS Game Project
  • Blitzbat's Blog
  • gordonramp's Blog
  • Andy Gilbert's Blog
  • Marcus' Blog
  • JornAggror Blog
  • diedir's Blog
  • wayneg's Blog
  • Masterxilo's Blog
  • Dave Lee's Blog
  • peubuy's blog
  • OD Arts -Leadwerks Blog
  • The progression......
  • Ultra Software Company Blog
  • The Progression
  • Pancake's Blog
  • Test Blog
  • BLaBZ Blog
  • Pure³d's Blog
  • dreamhead Blog
  • RVL's Blog
  • DB's Blog
  • Toxin Games Development Blog
  • CombatHelo Blog (RSS Import)
  • Foolish's Blog
  • ZioRed's Corner
  • Toxin Games Twitter
  • Shard - Third Initiative
  • Shard's Blog
  • Soamp's Blog
  • Soamp's Blog
  • Laurens' Blog
  • JT`s warehouse district
  • Kennar's Blog
  • KiteFuchs' Blog
  • KiteFuchs' Blog
  • Rachel's Dev-Blog
  • Eagle's Blog
  • zaphos' Blog
  • please delete this blog
  • Afke's Blog
  • Richard Simpson
  • knowledgegranted's Blog
  • EdzUp(GD)'s Blog
  • aGameLife's Kelasel MMORPG Blog
  • tournamentdan's Blog
  • Beyond Civilization Blog
  • smashthewindow
  • AnniXa's Blog
  • AnniXa's Blog
  • Elemental Development
  • DigitalHax Blog
  • Aria's Blog
  • Strogg76's Blog
  • Clackdor's Blog
  • Leadwerks Project Status
  • simpleprogrammer's Blog
  • Pathfinding in LE.2.x
  • Naughty Alien's Blog
  • smashthewindow's Blog
  • Ali Salehi's Blog
  • Jardar's Blog
  • Chris Vossen's Development Blog
  • Scarlet Thread Studios' Blog
  • Kronos' Blog
  • Benton's Blog
  • ChrisV's Blog
  • tjheldna's Blog
  • shadmar's Blog
  • 3D Masons, LLC
  • Andy Gilbert's Enviro Models
  • ParaToxic's Blog
  • NarkLord's Blog
  • ChrisMAN's Blog
  • ChrisMAN's Blog
  • CGMan's Blog
  • The Game
  • Chris Tutorials
  • Leadwerks 3 Experience
  • An Alien Saga
  • klepto2 & Leadwerks 3
  • Inside the mind of eternal insomniac
  • josk's Blog
  • Shader Development in Leadwerks 3.1
  • 3D Coat : Column game making of
  • Einlander's Blog
  • Ginger George's Blog
  • I have a problem
  • Michael_J's Blog
  • nasamydifol's Blog
  • Digman's Blog
  • noesisGUI
  • SavageDogg38's Blog
  • Built from Ruins
  • Remaining Days
  • test_external_blog
  • The Hunt For Food Blog
  • Crazy Minnow Studio
  • CrazyMinnowStudio
  • Guppy's Blog
  • Playing Online
  • Evayr's Blog
  • DerRidda's Blog
  • Karl's Blog
  • whiterabbit's Blog
  • Tinyboss Games
  • abendkleider's Blog
  • sacguccireplica's Blog
  • Arena
  • Imchasinyou's Blog
  • xtom's Blog
  • Lua is better than you think.
  • mdgunn's Blog
  • Crime Closer
  • lxFirebal69xl's Blog
  • Wedmer's Blog
  • Lockdown, going forward.
  • Pump-Action Captain
  • Igor's Blog
  • Dead Anyway
  • Runenrise and more
  • reepblue's Blog
  • Slippy's Corner
  • LUA Musings
  • severjack's Blog
  • mikeporter's Blog
  • miko93's Blog
  • Megalocerous' Blog
  • lxFirebal69xl's Blog
  • aiaf's Blog
  • Lostghbear's Blog
  • echo $BLOG_NAME > blog_title.tmpl
  • johnadam111's Blog
  • Dwarf Beard
  • burgelkat's Blog
  • Charrua's Blog
  • peterpaul's Blog
  • joshmathews' Blog
  • Martin Kearl's Blog
  • Brutile's blog
  • tipforeveryone's Blog
  • Glushchenko Blog
  • Express Lab Games Blog
  • Blueapples' Blog
  • DooMAGE's Blog
  • Structura devblog
  • UltraEngine - Experiences, add-ons and other Stuff
  • martyj's Blog
  • Dragonfreak's Blog
  • Brutile's Blog
  • assigmenthelp
  • Case Study Assignment Help
  • How to deal with bad grade ?
  • How to deal with bad grade ?
  • GameDev Blog
  • devcjohnson's Blog
  • devcjohnson's Blog
  • THE WHAT? Blog
  • The Demurian Scribe
  • GUI Editor
  • GUI Tutorial
  • noob_shaders
  • The Seventh World
  • Phodex Games Blog
  • Leadwerks VS Source 2
  • Work in Progress - Scifi PBR Media
  • [C++] First Player game start
  • The Blog of Yue
  • Snowboarding Development Blog
  • Ocean: Rendering in Leadwerks 4
  • Game Ready Maps
  • Ultra App Kit (Advanced Custom Widgets)
  • Poking around
  • SALVATIONLAND
  • Blender tutorials
  • Usefull Scripts & Components
  • Thirsty Panther
  • Ultimate Action Game Controller

Forums

  • Software
    • General Discussion
    • Programming
    • Game Artwork
    • Showcase
    • Suggestion Box
    • Bug Reports
  • Addons
    • Extensions & Plugins
    • Components
    • Addon Development
  • Platforms
    • Windows
    • Linux
    • macOS

Categories

  • Streams and Events
  • Tutorials
  • Games
  • Work in Progress

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location

  1. Hi, I was lately thinking about converting all my code from Lua to C++. Without knowing the size of my project, do you estaminate this is something taking very long, like more then 2 months, or is this something you could do within a week (I maybe have about 60-80 scripts) if you are working hard on it? Furthermore do you see any advantages in doing this (or better said is it worth the time) and I am not talking about speed, I much more mean the libraries that C++ offers and the more precice debugging. Thanks for your ideas and Merry Christmas.
  2. Hey, I am currently working on my AI, and I wonder what would be a good way, to make my NPC hold a specific distance to the player. In my case I need it for my AI behavior when it is using range weapons. I think a nice idea is to let the AI find a random point, which keeps a few conditions like, 10 units away from player, not outside of the map, not inside another object. But how to realise that. I would be very thankful if you can give me ideas, examples, descriptions etc.
  3. Restarted my networking framework yet again. This time I gave it a new name 'Hexe'. The old name was 'Overwatch'. It was named long before the Overwatch game came out. It was based off the Half-Life Overwatch. It oversaw the players, ai spawning, contained a secondary path-finding system, but had no networking as it was not native to the LUA side of Leadwerks. 'Hexe' is German for 'witch'. I don't really know why I chose the name but I have the feeling I will be able to put it to good use. Maybe I'll even mix in some Anglish into it. This restart occurred because the framework became too cumbersome. I had the entity synchronization working correctly, but it did not differentiate between player and an object in the world. That wasn't really that bad, what made messed it up was that a lobby system and teams were needed and there was no space to squeeze any other components into the mix. This rewrite will focus on the player/client and foremost. The components that are currently being written or are complete are: The server browser. This was a side project created out of necessity. I did not want to have to hard code the ip every time. Anytime I wanted to test multiple clients I had to change the code depending on which computer was running the server. PITFALL: Since Leadwerks does not expose the servers local ip address via code, you will need to get it manually from you computer, or use some creative workarounds Network Manager Hexe is split up between a server class and a client class. Both classes use a network manager class that can automatically handle hosting or connecting to a server. The network manager currently handles the handshake and the beginnings of the lobby system. When a client joins it initiates and handles the handshake between the server and client. It also raises events so the server or client can react accordingly if need be. After the handshake is completed, the network manager starts the lobby system The connection handshake. This is was saved from the last version. It makes sure the server and client are using the same protocol version. It will then register the client on the server and give it an incremental number (similar to the source engine) that allows the client state to be manipulated The Lobbying system: This is completely new. After the handshake is complete, it will send a command launching the lobbying system. The network manager only makes sure that a client is in the servers lobby and nothing more. The client and server manually handle the team creation and player switching on their own. Teams are not part of the network manager because it would require large amounts of rewrites depending on the type of game being created. When the lobbying system is complete the client input will be added. So far things are going well and maybe soon I wont be staring at console output for feedback.
  4. Seems that scripts cannot be attached to objects, while using Linux Mint 18.2. In the following video an attempt to attach the Spectator.lua script to a camera results in failure. This was also applied to a CSG and the TriggerChangeMap.lua, ending with the same results. https://youtu.be/ucTMUP8cZSg Edit: This morning the Leadwerks contents were verified through Steam and everything checked out. Also, started a new Leadwerks configuration directory, and project, ending with the same results. Scripts are not attachable. @Josh
  5. I've spent the last few days creating a simple self contained server browser. It will list all the servers of a specific game, allow the user to select a server and send a callback with the selected info. Requirements: The script from this topic placed in a file here: Scripts/Functions/eventqueuemanager.lua The Script: A simple example: It will create a server and open a server browser window. + Starts the move mode, click to exit it. X closes the window. import("Scripts/Functions/eventqueuemanager.lua") import("Scripts/serverbrowser.lua") local window = Window:Create() local context = Context:Create(window) local server = Server:Create() System:Print("Server1 publish::" .. tostring(server:Publish("Example Temp Test Server", "Testing population of server list from masterserver "))) server:Release() function test(ip,port,close) -- callback function System:Print("Callback") System:Print(ip) System:Print(tostring((close == true) and "close" or "")) end local serverbrowser = serverBrowser("Example Temp Test Server",context,0,0) -- create the serverbrowser serverbrowser:SetCallback(test) -- set callback -- do stuff while true do if window:Closed() then return end if window:KeyHit(Key.Escape) then return end Time:Update() context:SetColor(0,0,0,0) -- need to clear alpha!! or the gui will stay on screen!! context:Clear() EventQueueManager:Update() context:Sync() end serverbrowser:ClearCallback() -- remove callback serverbrowser:Release() -- release everything The server browser will obey the limits of your window. If any part of it is not on screen, it will be pushed back onto it. Edits: -2017-8-24: -Added the ability to directly connect to a ip and port. -Moved the code to put the window into a function and check on server browser creation. -2017-8-25: -Added the abilitiy to automatically resize to fit inside the bounds of the current context
  6. [I had text here but in the edit it dissapeared ] I found that there can only be one instance of the EventQueue. This meant that all the widget events need to be handled in a single location leading to possible complications in code and lowering the possibility to dynamic things. This script allows the developer to subscribe to an eventqueue manager and get their event safely, without usurping all gui controls. The script will automatically create an EventQueueManager variable that all other scripts can expect. To use it from a script not attached to an entity use: EventQueueManager:AddListener(Update) -- a simple function On a script attached to an entity or a lua based class use: EventQueueManager:AddListener(serverbrowser.Update) -- convert : into . Place the script into a file at: Scripts/Functions/eventqueuemanager.lua
  7. I am trying to have a generic gui class and I realized that there can be only 1 EventQueue. This means that all widgets must be managed from a single area. This means that I can't create a gui class that handles its own events without using some creative methods that have some serious edge cases. I would like to specify my own function/callback/eventqueue to call for each widget item. It would allow people to create safe, shareable scripts. I would like to create a widget and pass it a local eventqueue such as this one and handle all the events locally.
  8. I discovered that there can only be one eventqueue in leadwerks. I wanted local eventqueue instances, so I created a lua based version of EventQueue called EventQueueEx It is initialized as such: MyQueue = EventQueueEx:Create() It is used EXACTLY the same as the Leadwerks version.
  9. While writing a server browser I discovered that RemoteGame does not not have a port property. So if you do set your server on a non default port, you will not be able to connect to it by using the server list. Which leads to this issue:
  10. Hi Simple question, I cannot find a GetAnimation and GetAnimationFrame function in the API. I realised those functions in my own AnimationManager script manually, but since there is the "new" entity:PlayAnimation function how to get access to this functions? Any ideas or suggestion? EDIT: Would also be good to know how to get animation index by name and the other way around. Something like: self.entity:GetAnimationName(0) or self.entity:GetAnimationIndex("Idle"))
  11. Hi I have a small problem. I think the pictures should explain it pretty good With font size of 12 see the terrible cut on the top?: With font size 20 it is a little bit better but somehow not as sharp as it should be; This is how I would expect it to look like: I am rendering the text with the default arial.ttf font, I render the following color Vec4(0, 0, 0, 255) and with blendmode Blend.Alpha. So whats the problem? I remember the text rendered sharper another time, but I dont know what I am doing wrong atm? Any suggestions?
  12. Hi This is probably a noob question regarding the IDE. I had been able to open Lua scripts in the editor in the past; however, a source code window is not available. What am I missing? TIA J
  13. Is it possible to load external modules such as MQTT? If so, is there any documentation on how this can be done? I have a good amount of programming background but haven't done much scripting with Lua until recently. I've read something regarding Lua Rocks; however, the tool is looking for a lua.exe binary. Thanks!
  14. I wrote a script that processed all top level entities. When rearranging the scene hierarchy and running the game again WITHOUT hitting the map save button it gives the wrong result. It fixes itself when you explicitly click the map save button. Video: http://einlander.duckdns.org:8000/f/32c4297246924043960b/
  15. Hi, I pretty often encounter the followning problem: I need something to be called before, or after the Start function of an script. My actual problem is that I have an NPC and his "Load" function (I wrote by myself) is called before the script actually is initiated. The problem is, in the load function some values are set (like npc health) but then the script gets initiated and the script uses the default script value of 100% health and the loading does not work. A workaround I found is to use the first step of the update function but I find this not very smart. Here an example: function Script:UpdateWorld() if self.doOnce ~= true then --do something here self.doOnce = true end end Any ideas how to solve this more elegant? Would be really glad if we could gather some ideas Markus
  16. Hi, I have a general inventory script attached to every object, which should have an inventory. In the script settings of the inventory script I put an "firstSlotOffset" value, to adjust where the inventory starts to render its slots. In code this looks like that: Script.firstSlotOffset = Vec2(0, 0) --Vec2 "Slot Offs." In the start function I do some calculation: self.firstSlotOffset.x = self.firstSlotOffset.x * context:GetWidth() self.firstSlotOffset.y = self.firstSlotOffset.y * context:GetHeight() The problem is if I load to another map and back to some other map the self.firstSlotOffset value seems corrupted. This happens only after I loaded twice (so changed the map two times). I found that out by printing the self.firstSlotOffset value in the start function. What I mentioned is if you loaded twice the self.firstSlotOffset value is not what is set in the script settings but the result of the above calculation which should not be. If you change a map, all variables should be "nil"-ed shouldn't they? And by the way what do you have to take care on when loading to an new map? Do you need to clean stuff up and if yes which stuff? I guess that could be the problem that I didnt clean up. P.S.: The error only appears for the player inventory, which is the only entity staying the same on both maps I load to.
  17. With the last update the new default main.lua causes crashes when run. The old main.lua still works though. --edit-- Simply commenting out all the gui related related lines causes the game to 'Assert Failed' at world:Render()
  18. EDIT: Just found out that the error was somewhere else ^^. The below code just works fine. Anyway thank you for the help :). Hi there, I faced some weird behavior, testing and debugging my project. The following shows the structure of my code, it would be very kind of you, if you could tell me if you can find any error, because I dont. Maybe I messed around with global/local/script variables, which I know, often cause such errors. Explanation: Of course this script makes no sense, but it should only representate the structure, because it would be way to complicated to explain the issue within the actual script. So what is the problem? When I apply the "Main Script" to one entity, everything works fine and I get printed the data. but if I apply the "Main Script" to more than one, for example two, then the problem occurs. In the output I get the "Send my data!"-message, but now comes the weird thing. It prints the data and then, even if the "Test"-function is just called once it prints "Variable data is nil!" twice. And this happens for both entitys. So this is my output with two entities with the "Main Script": Send my data! Test Variable data is nil! Variable data is nil! Send my data! Test Variable data is nil! Variable data is nil! Main Script: Script.dataToSend = "Test" Script.data = nil import "exampleScript.lua" function Script:Start() self.myLuaClass = testClass(self) end function Script:Test(data) if data ~= nil then System:Print(data) else System:Print("Variable data is nil!") end end The "exampleScript.lua" Script: function testClass(script) local container = {} function container:CallMeFromAnywhereToSendSomething() self:SendSomething(script.dataToSend) end function container:SendSomething(sendData) if sendData ~= nil then script.data = sendData end if script.data ~= nil then System:Print("Sent my data!") script:Test(script.data) end end return container end Addition: I was able to work around this issue by simply checking if the variable is nil, or not (I actually need/do stuff with the "data" variable in my actual script), but still I am confused. Maybe you can help me out. If you find other mistakes, or have improvement suggestions for my "Class" system please tell me. Thanks for reading
  19. I want to use multiple scripts in my character, but I don't want to change the FPS script. I hope this feature will be added in the future. Leadwerks / Unity Thanks Josh..
  20. 'm using the C++ SDK and lua for small objects code. I need to create the entities from C++ and later use the bool Entity::CallFunction(const std::string& functionName, Object* extra) How to 'bind' on script lua to an entity ? it looks that Interpreter is using tolua++, but I can't figure how to load the .lua properly to the object // Create 100 special entity std::vector<Entity*> list; for (int i = 0; i < 100; i ++) { Entity* entity = new MyEntity(); entity->AddToWorldTable(true ); list.push_back(entity); } // Load special script (But not working, object not callable). Interpreter::NewTable(); Interpreter::SetGlobal("Script"); // Must Script. Don't change that, because the script are prefixed with Script:myFunction if (Interpreter::ExecuteFile("MyEntity.lua")) { System::Print("Error: Failed to execute script \"" + it + "\"."); } for (auto&it : list) it->CallFunction("OnSpecialFunction") Script Lua function Script:OnSpecialFunction() print self end
  21. Welcome to the Sixth Monthly Script Challenge Each Month I will set a challenge for gifted Leadwerkers to solve. Once you have perfected your script post your map to this thread. At the end of the month I will go through all the entries and judge the winner. I will then place the winning map on the Workshop so others can learn from them. Rules. Entries must be your own work. Entries must be submitted before the end of the month ( June ). Any assets you use must be your own or Royalty free. The map that you submit can be used by others for commercial use. Have fun. June Challenge After asking for suggestions from the Leadwerks community . I've decided to use Slastraf idea of Flying Enemies. The enemy could be like a dragon that circles and swoops on the player to attack them causing damage. Or perhaps it could be a drone like enemy that tracks the player and shoots them as it gets within range. How you implement your script is up to you. Remember the winning script should not only solve the problem but should also have comprehensive comments within the script so that new users can learn from your script. Prize Damien Defranco and his company Vixeemo are now the proud sponsors of the Leadwerks community monthly script challenge. Vixeemo (http://vixeemo.com) is an all-in-one business solutions brand for your start-up or project needs. The winner will receive a free web & graphic design package provided by Vixeemo that includes a 3-page professional website design (Home, About, Contact), logo design and integration, banner/slider design, a blog section, and an additional gallery page to showcase images/video or projects. Vixeemo will work with the winner to fully customize everything to bring the vision to fruition. This prize is perfect for any Leadwerks user who wants to get their project or brand onto the internet. The winner will need to provide the domain ( TomsHardware Guide ), and Vixeemo will do the rest. This design package is valued at over $400 USD. This is a great reward for your hard work and a great way to give your game project that professional look to make it stand out from the crowd. If you have any ideas or thoughts on the Challenge please feel free to comment. I'm looking forward to your submissions. PS Josh could you kindly pin this thread please.
  22. Welcome to the Fifth Monthly Script Challenge. Each Month I will set a challenge for gifted Leadwerkers to solve. Once you have perfected your script post your map to this thread. At the end of the month I will go through all the entries and judge the winner. I will then place the winning map on the Workshop so others can learn from them. Rules. Entries must be your own work. Entries must be submitted before the end of the month ( May ). Any assets you use must be your own or Royalty free. The map that you submit can be used by others for commercial use. Have fun. May Challenge Another weapon challenge this month. Sorry mdgunn its not a portal gun. Most of the weapons we currently have for Leadwerks operate on a single target. What we need is something that will take out a group of enemies in a hurry. So this months challenge is to make a grenade. Your grenade should damage all enemies within the blast area. It should also have an effect on physical objects in the blast area. Think barrels getting knocked over etc. How you implement your script is up to you. Remember the winning script should not only solve the problem but should also have comprehensive comments within the script so that new users can learn from your script. Prize Damien Defranco and his company Vixeemo are now the proud sponsors of the Leadwerks community monthly script challenge. Vixeemo (http://vixeemo.com) is an all-in-one business solutions brand for your start-up or project needs. The winner will receive a free web & graphic design package provided by Vixeemo that includes a 3-page professional website design (Home, About, Contact), logo design and integration, banner/slider design, a blog section, and an additional gallery page to showcase images/video or projects. Vixeemo will work with the winner to fully customize everything to bring the vision to fruition. This prize is perfect for any Leadwerks user who wants to get their project or brand onto the internet. The winner will need to provide the domain ( TomsHardware Guide ), and Vixeemo will do the rest. This design package is valued at over $400 USD. A great prize for your hard work and a great way to give your game project that professional look to make it stand out from the crowd. If you have any ideas or thoughts on the Challenge please feel free to comment. I'm are looking forward to your submissions. PS Josh could you kindly pin this thread please.
  23. Hey guys, I was searching the forums for a releated subject, but I couldnt find one, but I could imagine there is one, if so I am sorry to post the same topic again So I am currently trying to come up with a way to handle diffrent objects rendering in the right order. What solutions have you for this problem. For example: I have a trading menu, but my cursor is rendered behind the inventory slots and buttons rendered by the NPC Trader entity. (elements of my trading menu are rendered by two diffrent entities (Player and NPC Trader)) I was thinking about something where you can set a variable "renderPriority" which indicates in which order objects are rendered. So if render Priority is 1 those objects "PostRender" function is called before all the others, then come entities with priority 2,3 and so on. Thats the point I am stuck . How to make the other PostRender functions "wait" unitl the PostRender function of an specific entity is finished. This I a problem I occured pretty often and havent found a solution yet, I mean that you control the order entities call functions like UpdateWorld() or PostRender(). Would really appreciate if somebody can come up with an idea
  24. Operating system or device - Leadwerks Version: Windows 7 Pro x64 Leadwerks 4.2 Beta BuildID:1737986 Issue description (what happened, and what was expected): Issue Models with physics that drop onto the character controller will bounce higher [*]What was expected The model to hit the top of the character controller then fall off. Steps to reproduce Load the fps AI and events map Pick up any entity Look directly up Drop it Link to minimal example project No project just a video
  25. Spent ages trying to figure out why a certain line of code keep breaking the program. After deciding to restart Leadwerks I reopened the script file and suddenly there was a break-point at that line. I did remove it before hand, but it obviously just removed the icon, not the actual break-point. Hope this can be resolved soon.
×
×
  • Create New...