Unreal.js

Trying to return a variable to a blueprint from the javascript code

Hey There! Thanks for this plugin, its great! currently using it as part of my University Dissertation project :slight_smile:

I’ve been trying to figure out how I can return a variable from JS to a blueprint. I can call the function fine but i cant get the variable to be passed back :S
I found the page on UPROPERTY on the wiki but even with the flags the value will not be passed back for osme reason, I’ve never used this flags before so Im sorry in advanced if this is such a rookie mistake :smiley:


        GetServerID(_posX/*int*/ , _posY/*int*/ , $/*return+int*/ ) {
            console.log(GetServID(_posX, _posY));                      //Prints correctly
            console.log(typeof _posX);                                      //Prints correctly
            return _serverGrid[_posY][_posX].id/*return+int*/ ;   //Returns 0 always, even with hard-coded value
        }

Im using the plugin from the marketplace with version 4.14.3 of UE4.

Any help or hints is greatly appreciated!