I have some NPCs that walk towards a certain point, and if the player closes a door, they will jump back to where they started.
If they reach that certain point, they activate a self-switch, which does work as far as I am aware.
Two out of these 3 NPCs work fine. But one of them won't move at all. Their movement is sort of set to be a little random, but for the one that won't move, it should be like a 45% chance to move forward.
I don't quite understand what's going on, as the other two move as expected (or at least as expected as random movement can be). I'll provide the code for one of the two that work, and for the one that does not.
This is the one that is working,
and this is the one that is not.
If they reach that certain point, they activate a self-switch, which does work as far as I am aware.
Two out of these 3 NPCs work fine. But one of them won't move at all. Their movement is sort of set to be a little random, but for the one that won't move, it should be like a 45% chance to move forward.
I don't quite understand what's going on, as the other two move as expected (or at least as expected as random movement can be). I'll provide the code for one of the two that work, and for the one that does not.
This is the one that is working,
and this is the one that is not.