Lua Scripts in BP - anyone interested?

Hi

I’m working on a system to use Lua Scripts in Blueprints.
Right now the prototype works like this:


(Yes Int to String -> Calc strings -> Strings to int! Ugly, but hey! It’s Lua :D)

Does anybody else need this or is there allready a plugin for that?

Cheers

That’s nice many people will like it and use it. Are you going to update your progress here?
Good luck!

Sure, but for now I have to start moving the code into a plugin and that gives me freakin’ headaches.
Lua interpreter -> No problem. Writing a UE4 Plugin -> too dumb…

Next up will be a way to register BP functions to be called from Lua code, so you can do stuff like this:

Don’t know if this is usefull but it looks cool. :smiley:

I’ve never used LUA so this isn’t useful to me, but it should help pave the way for some other languages in the future and the more versatile UE4 becomes, the better. Keep up the good work!

Here few hints for you that you can use. I’m not sure if it’s too complex for you, but considering you playing with lua you may have a skill for that

1.I think the way the code node looks like it not suitable for coding so you could try creating your own node type by extending UK2Node, with custom UI fitting to editing code (like textbox taking whole node space):

There no documatation other then API refrence you would need to look up the source

  1. Instead of manually registring functions which with large number it would be very annoying you should utilize UE4 reflection system to get functions and property bindings, so Lua interpreter can atleast automatically register function inside blueprint it is in

  2. there already Epic plugin that trys to implement Lua also with use of reflection system, you could check it out

https://github.com/EpicGames/UnrealEngine/tree/release/Engine/Plugins/ScriptPlugin

Thanks for your suggestions!

Actually I’m not a good c++ coder and started using it and UE about two months ago. I however have over 10 years of C# coding experience, so maybe I’ll get used to it someday. But for now I wouldn’t consider me having something like “skills”. :wink:

Sure, there are literally THOUSANDS of people out there wishing for a better text editing node. Don’t know if I’ll be the one to make this possible. Maybe if I have a enough spare time.
For now it’s better to use something like Notepad++ anyway for its syntax highlighting.

Yep, I know that one and took a few wrapper functions from it for testing.

We already had a discussion about of what use this plugin might be. It’s not (at least not in the first version) intended to code large programs, even if Lua is indeed capable of containing very complex logic, it’s probably going to be veeery slow. So for now it shouldn’t be neccessary to register over 10 functions. If you need more than that you should consider using c++ instead.

But I’m excited to see in wich ways developers are going to use this plugin and that is what will guide the further development of it.
I don’t want to put hours and hours of time and effort in this just to see that nobody uses it.
For now I’m implementing all the functionality I need for my project and release it in that state. Everything after this will be driven by the requests from the community.