VAR toggle and random number to display object

Hi there!

I need your help:
I want to display object, when random number is between let’s say a and b AND toggle VAR_1 = 1

So in opacity of that object I placed formula

$((rand(1, 3))=1)&&(#VAR_1#=1)?100:0$

but it is not working…

Can you help, please?

Hi Mate just tried it out you have way to many brackets in the formula try this

That should work fine

Thx! It is!
But, object blinks as random number gets new number every some miliseconds…
I wish to keep the product of random function.
Can that be stored in other VAR, like VAR_2?

I mean somehow to generate random number, check the condition I created (with dazstacey correction) and keep object on the screen UNTIL VAR_1 gets 0 again…