Code:
function TestCallback() {
let res = null;
$gameMessage.setChoiceCallback(function (responseIndex) {
res = responseIndex;
switch (responseIndex) {
case 0:
// Code
break;
case 1:
break;
case 2:
break;
}
});
return res;
}
So i want to return the value of the responseIndex to an outer function, but somehow its not working and i don't know why? Am i missing something or is it not possible?