[Solved] How to test if there is nothing in a specific area but somewhere else?

I’ve been making a rhythm game and so far it’s been turning out really good, I’ve made the notes fall down, the keys and binds to press, and the ability to get missed notes, and different scores based on how you time it, but the one thing I’m having problems with is the mechanic where if you don’t hit a note when you press the bind, you get a strike, I’ve been trying for the past three hours (since posting), not working.

I want the player to be able to press a button and get a strike on two occasions, when the note isn’t on the key, and when there isn’t a note in the line of the area or in scene.


(This is the key the notes fall onto, there are multiple rows of this.)
I have the first occasion down pat, but because of the way I made the system, I can’t use anything related to picking or conditions on notes because testing for 0 of something isn’t possible if you also have a condition (because if the condition returns true the object must exist).

Here’s what I have:


For example if I did a condition to test if the note wasn’t in collision with the key, it wouldn’t work because to test if something isn’t in collision, the something has to exist, as I stated before.
I feel so dumb, and the answer is probably so obvious, I just don’t want to have to work on this for so long just to get no where.
I barely ever ask for help.

Still need a reply, I kinda have a deadline for this, still haven’t gotten this feature to work, IDK what to do.

To find out if something didn’t happen you can use these approaches. There are many others.

You can use the NOT condition.

If the sub-condition within it is true it becomes false and if it’s false it becomes true.
Screenshot_20241110_180908_Chrome

.
You could use a boolean variable. Set it to false. If a condition(s) happen set it to true. Then check the value of the boolean

1 Like

Does this work like inverting a condition? Or does it work differently?

Nevermind I got it to work properly, I guess I never considered the NOT condition because I just presumed it’d be like inverting, although it kinda is it does have major differences, thanks a lot!

1 Like

This is where it confuses people including me.

They’re similar.

Say you had 6 objects

Mouse on object
If 1 is touched, it picks 1 and it’s true, Actions are trigger

Inverted mouse on object
If 1 is touched then it picks the 5 that aren’t touched and Actions are trigger

NOT mouse on object.

If any are touched it would normally return true but the NOT makes it false, nothing happens

If none of the objects are touched then instead of false it becomes true. Actions are trigger

2 Likes