Cant check point inside object group

This doesn’t work.

Image

But this works:

Image

Why this condition doesn’t work with checking points inside object group

What do you mean by it doesn’t work? Does it hide the player when it shouldn’t, or does it not hide the player when it should?

It doesn’t hide the players in both cases, Inside blocks group or not.

Why do you check for the block nearest? Why not just check if the player point is inside a Blocks object?

I ask because of the following situation, where the player is inside the green block but the nearest block is the orange one:

Because I was trying to troubleshoot the issue.
I’ll try tomorrow to remove it and see if it works, though I highly doubt it.

What are you trying to achieve - what is the logic that you want to implement?

The inverted “player point in a Blocks object” will be true in the image above, because the player is not in the orange block.

What I’m trying to achieve is the same condition as

if player is not in collision with blocks group

but checking from the center of player would give the player less space to leave the blocks group before being hidden.

Also because I think they are more performant than collision conditions

a quick test showed it to be marginally faster most of the time, but not enough to be noticeable.

You could first hide the player in an unconditional event and, in the event straight after, check if their centre is inside a block and make them visible if so.

Unfortunately I can’t. The reason that I’m hiding the player is for a respawn mechanism that triggers when a player is hidden. So I can’t just hide the player and show it after checking for the condition.

Is the mechanism controlled in events? If you hid the player in an event and in the event immediately after show the player, then events after that won’t realise the player was hidden for a smidgeon of time. Those later events just see the player as visible.

1 Like

I made a new project to test the condition without any external factors affecting the result.

Turns out, this condition has unknown inverse behavior.

These events don’t work:

But these do:

So I did the same for my game, but it doesn’t work.

I applied what you told me, but it didnt work: