What I am wondering is if there is a way to execute some Hollywood code, by adding it to JSON-format.
As in, lets take two different scenarios.
I might want to make a special mission where enemy ship needs to be destroyed, when that ship is destroyed, it should execute following code:
Code: Select all
{
"onComplete": [
{"HollywoodCode": "Function() GetReward(100) EndFunction"},
]
}Code: Select all
{
"onWin": [
{"HollywoodCode": "Function() UnlockCard("Special1") EndFunction"},
]
}Code: Select all
{
"onComplete": [
{"HollywoodFunc": "GetReward", "100"},
]
}But in ideal case I wouldn't need to tell the game anything about the JSON-script, but could simply add commands through JSON, without the game having any knowledge about them.
But is this possible? or do I just have to have it scripted in to the game code that HollywoodFunc "X" refers to FunctionX, and HollywoodFunc "Y" refers to HollywoodFuncY?