Rick Posted December 17, 2013 Share Posted December 17, 2013 There is a cool site for saving your code snippets. https://snipt.net I created an account and posted my global picking and calling a script function snippet. I tagged it with "Leadwerks". https://snipt.net/search/?q=Leadwerks Would be handy if others would make accounts and contribute any snippets they often use. If we get enough maybe Josh could include querying this site for Leadwerks tags in the Lua editor so we can bring up different snippets directly from the editor! Or if he ever makes the editor have a plugin system we could make this feature ourselves. I know there is code that I always have to go outside of the editor and look up. Looks like they assign a GUID to each snippet and in the raw link you get just the code back: https://snipt.net/raw/1070c25779bbfe8655d1a7eb25513d98/ Thoughts/Ideas? Here is how we'd use their web api to get all tags with Leadwerks returned in XML format: https://snipt.net/api/public/snipt/?q=Leadwerks&format=xml I just picture in the Lua editor we can do a key combination that does this query and returns the results to a dialog box. We pick the one we want and it gets inserted where our cursor was or something like that. 1 Quote Link to comment Share on other sites More sharing options...
Rick Posted December 17, 2013 Author Share Posted December 17, 2013 OK, so I've made a .NET app (windows only atm) that uses their web service that queries the above site for tags of "Leadwerks". It lists the titles out and when you click on a title it shows the code. You can then click a button that'll copy the code into the clipboard for you to paste it into the Lua editor/wherever. Need to tweak it some but this should get the ball rolling. I don't have huge hopes for this because it's not built into the Lua editor and it uses a 3rd party site where anyone can post anything with a Leadwerks tag and it would show up here which for sure would get abused at some point, but maybe it'll show the benefit of it and Josh could consider implementing something like this directly into the Lua editor where the snippets are from the Leadwerks site so they can be better regulated/controlled. Will post more later. Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted December 18, 2013 Share Posted December 18, 2013 A while ago it was mentioned that we could set up our own wiki that we as a community help build up. 1 Quote Link to comment Share on other sites More sharing options...
gamecreator Posted December 18, 2013 Share Posted December 18, 2013 I think that would be a great place to put code snippets. Quote Link to comment Share on other sites More sharing options...
Rick Posted December 18, 2013 Author Share Posted December 18, 2013 Was anything decided on where the wiki would go? Has anyone done anything around it yet? The only downer would be having a web service to pull this data so other apps could use it. Not sure if any wiki software will do this. Quote Link to comment Share on other sites More sharing options...
Tim Shea Posted December 20, 2013 Share Posted December 20, 2013 There's already a leadwerks wiki: http://www.leadwerks.com/wiki/index.php?title=Main_Page It would be awesome if that was cleaned up and updated for LE 3.X, because then there would only be one outdated source of Leadwerks documentation clogging google searches, instead of two. Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted December 20, 2013 Share Posted December 20, 2013 Although there is some useful information in the old wiki, it has been inactive for over more than 2 years. Josh has stated many times he will not be using it again. It would take an enormous amount of time to clean everything up. Even then you still wouldn't know if all the spam and malicious scripts are gone. Personally I think it is good to have a separate wiki. Josh doesn't have to spend time any time on it and the community has more control over keeping things clean. Quote Link to comment Share on other sites More sharing options...
shadmar Posted January 6, 2014 Share Posted January 6, 2014 Added skybox snippet for Steam Edition : http://leadwerks.wikidot.com/wiki:skybox 2 Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
shadmar Posted January 7, 2014 Share Posted January 7, 2014 Added entity indexer (get any entity in any lua script) : http://leadwerks.wikidot.com/wiki:entityindexer 1 Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.