I'm working on a minigolf game.
When a ball enters a sand area (trigger once), its linear dampling decreases. When it leaves the sand area (also trigger once), it comes back to the normal value.
(I replaced here the linear dampling events by writing "a" or "b" on a text element so I can precisely see if the events are run once or continuously)
The sand area is made from a dozen of sand squares instances.
If only one ball is in the sand area, "a" is written once. If two balls are inside the sand area, the code is run continuously despite the trigger once condition : it writes "a" continuously instead or once (total of twice, one of each ball and that's a turn based game).
Same for the leaving event: it writes "b" once if only one ball is outside the sand area, and it keeps writing "b" if both balls are outside the sand area.
What I want is for each ball, the code is run only once when it enters or leaves the sand area, regardless the number of balls present in the same area.
I guess this is pretty simple but I'm stuck on this and it puzzles me. Any idea ?