Looking for help on Custom Javascript setting application variables

I’m making a simple game. I have a function which needs to set several application variables when the function is called.

Since I don’t have direct access to the application variables from within the custom function, and I can only set one application variable by using the connectors, I don’t know how to set multiple application variables. This seems like a significant problem, so I’m guessing I’m just overlooking something?

Solved my own problem. I just needed to take a minute.

The trick is that you have to look at the output side and see that it has multiple output options, but each output option has options as well.

So, if I want to output a bunch of values, I can
return { A:1, B:2, C:3}
and then I can use A, B, and C by hooking up output 1 to a bunch of app set logic blocks.

The other output sections are so use in case you want to output a whole different logic branch. You can wire each differently.

2 Likes

I didn’t follow your solution. Trying to do the same thing:

  • Button, onclick: run Custom JS,
  • Then I need to set the value of 5 paragraph (text) objects on the screen. However can’t seem to directly access these, so thought I would link the paragraph fields’ Content to Application Vars, and then try and set these app vars within the Custom JS.

Can’t seem to work out how though…