First of all, this might be in the wrong section, and might be a better fit for either the c++ section or the General Discussion section. So if a moderator feels that it belongs somewhere else, then please move it for me.
It currently is at a very early stage of development and has a number of issues and will need a lot of work for it to become really useful. However I have already found it useful for making Math expressions a lot more compact and the blueprints containing them, easier to follow.
Some of the issues are:
- As each script (section) is defined as a string, the blueprint editor only seems to allow a single line to be used for each string/script. So I found myself having to write the scripts in notepad and then copy and paste them across.
- Currently very few Unreal engine functions are exposed to the scripts. As I said, so far I am mainly using them for Math expressions.
- As the interpreter is embedded in a Actor class, it can only be used in Actors that subclass that class. Really I should put it in a component and then any Actor should be able to add the scripting component.
- Will having a scripting interpreter that can be used in Blueprint just confuse people?
Having said all that, if there is interest in this, I will upload the c++ files here or on the wiki, so people can play around with it.
To try to show how it works a bit better, here is a screen shot of a blueprint that uses scripts to move the Actor’s location. Once when play begins, and then every time a key is pressed. In this simple example, just using the normal blueprint nodes would most likely be a lot better. However it might help to show what I’m talking about a bit better:
Or if we wanted to cut down the number of nodes, we combine the get and set variable nodes into the main script nodes, and also use a script print command to print the debug info to the screen: