Well, the first version of my Lua BP Extension is done.
There are three ways to use this plugin.
- Basic setup with one single node. They can pass up to three arguments and return values but can only take strings [Run Lua Static String] or floats. [Run Lua Static Numeric]
A simple example is shown below.
- The extended setup can be created with the [Run Lua Static] node.
This node takes and returns an array of [LuaValue] wich can contain a String, Float, Boolean, String Array or Float Array.
There are different conversion nodes available for each type.
- The advanced setup allows the code to be precompiled before it is executed. In addition to that it gives you the possibility to register custom Blueprint functions wich can be called from Lua code.
A Blueprint function can look like this. Values can only be returned by calling the [Return] or [ReturnSingleValue] node! The difference between them should be obvious.
- The interpreter calls the Main(arg1, arg2, …) function with the given arguments in order. The name of arguments is not relevant!
- Code that is not enclosed within any function will be executed immediatly after the code is loaded! This might be useful for some initialization but should still be avoided.
- This plugin uses Lua 5.3.0. Be aware that some older Lua examples you find on the internet might not work. This is NOT a Bug!
- Check the Message Log window. The Plugin tells you if there’s something wrong with the your Lua code.
Other than bugfixes I’m not planning to develop this plugin any further without request from the community.
So please post suggestions, Bugs or just usage experiences.
( And yes, I’m to lazy for a serious documentation :3 )
Update to 0.5.1:
Bugfix: Lua Nodes in some Blueprint classes fail to load after Plugin recompilation.
Update to 0.5.2:
Now compatible with 4.9.0 P2