Lua Script plugin

Finally found out how to bind a Lua function to an Event. A challenge was that the event could have any number of parameters of any type. I also wanted this to be fairly simple to set up in the Lua script.
The Lua script can now bind to an event with BindEventFunction(Object, "EventName, “LuaFunctionName”), I guess I could make the Lua function name type safe but I went for strings now to start with.

The test case assumed that you for some reason wanted to set a players head on fire when he passes a trigger volume. A standard Trigger Volume was placed in the map and should be controlled from the Level BP.
It turned out that Level BPs don’t attach Components so that has to be done in the BP BeginPlay. For the Lua script to get hold of the trigger volume I tested to make a BP-node that exposes any object with an optional Lua notify function.

The Level BP looks like this (The first event is just for reference, it triggers before the Lua script:

The Lua script:
LevelLuaScript.PNG

Burn baby, burn…