Thief Detection System Trial seems to be not working

I made an app to see how the room exit is locked down when it detects an unusual presence of a person.
When the thief comes in, it’s supposed to play alert.mp3, but it doesn’t.
Here’s the link.

I need help today, the deadline is tomorrow, I can’t submit it tomorrow.

1 Like

Alert.mp3’s volume is only 5. Could that be the problem?

1 Like

image
I set it to 50, it still doesn’t put the alarm. Maybe the system likes the thief guy…

1 Like

The variable lockFlag never becomes false, which is why the sound never plays. I guess you need to fix your logic in the nandLogic Function or somewhere else.

If you’re working on an assignment or a project for a paid client, the deadline is your own responsibility. We can’t rush to help you just because you’re in a hurry. I hope you understand that.

You haven’t given much explanation about how your app is supposed to work. Your explanation makes sense but how is your app designed to do that? For example, what would the expected outcome be (e.g. variable values) and what is actually happening when you preview it?

You might need to use the “when [sound] source loaded” block. See Sound - Thunkable Docs.

Which parts of the code do you want help with?

2 Likes

You see, the lockFlag variable returns true, the MotionSensorFlag Variable returns false, and the LaserLightFlag variable returns true.

image

I understand…

P.S. It’s not for a client, it’s a project with my friends, Evelyn and Lynn. I’m in charge of 100% of the code.

Okay, will this work?

You could use this event handler block to check if app variable lockFlag is true.

image

Did you mean this?
image

1 Like

My app is working as expected. Thank you!

<h1> Thank you! </h1>
<h2>to Human</h2>
2 Likes

Great! Always happy to help!

One more suggestion, you should probably change this topic’s name so that it will be easier for others to find if they are facing the same problem.