Account for no collision with 0 instances [SOLVED]

Please forgive my picture.

But these conditions only work when there are instances in the scene. I would like them to work all the time.

I tried using the “number of objects condition” but it did not work. I also test the action and I’m certain it is the conditions

Any help would mean the world. Thank you.

The number of objects condition sounds like a good idea.
You’ll need to mix this with what you have already.
Give it a try and share the events if you’re stuck.

1 Like

GDTaco is correct. Number of objects won’t work when there are no objects.

So, a few notes:

  • Never use “AND” conditions unless it is directly part of an “OR” statement. It can cause oddities to occur and just bloats your code. All events are treated as “and” when they’re in the same condition box.
  • That said, I think you can make this work by simply using the NOT condition, and putting the “F2 is in collision with F” condition within it, but uninverted.

Not is different than inverted, although only very slightly. Inverted means “evaluate the reverse of this condition”. Not means “This condition is currently false”. Very similar, but different in some use cases.


So this is what I did, logically it should work however it still does not. It adds to the variable even if conditions are not entirely met. It add whether or not there is a collision.

(W behaves the same as F from the first picture)

UPDATE: it not properly functions but only if i use key pressed not released.