0

I have the following lines of code in which I wanted to initialise my Boolean in my From Script in Spark AR to the value 'true':

Patches.setBooleanValue("gameOver", true);

However, I am getting an error which tells me that the value cannot be set to true because it is not of type BooleanSignal, but the tutorials in Spark AR itself is using the boolean 'true' and there are no special steps mentioned to use the BooleanSignal type for this function. May I know any possible work arounds ? Thank you!

Ckoh
  • 51
  • 5

1 Answers1

0

Managed to resolve this with the following code:

Patches.setBooleanValue("gameOver", Reactive.val(true));

You have to remember to include the following line at the top with your Scene and Patches modules

const Reactive = require('Reactive');
Ckoh
  • 51
  • 5