![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Nickgenfailed |
An illustrative situation:
Area A - mask for B + C
Area B - mask for C
Area C - no mask
Now both A and B have connect to their own area_entered
with their own methods (on_area_A_area_entered
and on_area_B_area_entered
).
Now what happens:
B moves into A, triggers:
on_area_A_area_entered
on_area_B_area_entered
But on_area_B_area_entered is meant for collision with C which means on_area_B_area_entered
has to include something like:
if (area.Owner.Name == "AreaA") return;
and after that is the code for collision with C.
Honestly, I’d expect since the mask was set only on area A that only signal that would get triggered would be the one on A and if both A and B had mask for each other then both A and B would get the trigger but it’s not the case so I’m wondering now.
Is there, please, some way to do it or do I need multiple areas all for different collissions or start all the collision codes with a switch/if statement as above?
I know there’s Monitoring and Monitorable but that’s not going to do it since ale the areas are checking for something or something is checking for them.
Thank you very much I’m a bit confused here :-).