I started learning Articy:draft with the intention of integrating it into my content pipeline of my custom game engine. For this, I would need to be able to call native code functions from articy scripts and so I started looking at what the exported data looks like for some simple scripts. I put the following code into a condition node in a flow tree.
- Code: Select all
equalityTest() == getObj("test") || getObj("test") == equalityTest2() || selfTest(self) || objTest(getObj("test"))
The methods equalityTest(), equalityTest2(), selfTest() and objTest() would obviously need to be implemented on the game engine side. I would expect them all to return or accept an argument of the same type, an object reference.
However, when looking at the output of the json export, this is what Articy gives me:
- Code: Select all
{
"Name": "equalityTest",
"ReturnType": "string"
},
{
"Name": "equalityTest2",
"ReturnType": "ArticyObject"
},
{
"Name": "selfTest",
"ReturnType": "bool",
"Parameters": [
{
"Param": "aParam0",
"Type": "ArticyObject"
}
]
},
{
"Name": "objTest",
"ReturnType": "bool",
"Parameters": [
{
"Param": "aParam0",
"Type": "object"
}
]
}
Two of the methods treat the data as an "ArticyObject", one as an "object" and one as a string(!). What is going on here? Shouldn't they all be the same kind of object reference? Am I missing something? Especially the fact that the two equalityTests return different types is a bit worrying as the only difference between them is the order of the calls.
Then a few random questions:
Is there a script reference somewhere? Eg. a list of all methods supported by the scripting system? So far I have seen getProp(), setProp(), getObj(), random() and print(). I guess these only really make sense in Articy itself as the game engine is free to do whatever it wants with the script code, but still it would be nice to know what methods are supposed to be "supported".
If I implement more methods on the game engine side, is it possible to expose those to Articy to have them show up in the autocompletion drop-down menus?
Cheers!