Hi! I don't understand the behavior of my function.
This is a map:
The player (purple) automatically stops in the middle of the green field.
Then, the probe (black) will automatically start exploring the area in 4 directions. Its task is to record in which direction the player can make another move.
Here's the code:
I want the probe to start after the player stops. The probe will write to the array objects from the 4 studied directions. On the map above you can see the moment when the probe moved from the player in the first direction.
Currently, this code works like that:
the probe will write to the array only the first object, the green one from which it starts.
And normally, when I turn off the function and I turn on the code above, it will work properly:
it writes to the array all the objects encountered by the probe. But unfortunately it does it all the time while moving on the map with the player.
So I need a function that will run the probe only at a specific point and time of the map.
Do I have to send something to the function?
I suspect that this is another missing element in my Construct learning. Oh, I would really like some advanced course, maybe you know one?