i noticed that most of the time “remove mapping context” and “add mapping context” works fine but sometimes don’t fire but running the same code.
I have game that contains seven mini games that loop when game 7 is finished. One time the event didn’t fire when starting game 7, the next time when starting game 4 and so on.
It seems like the events won’t assign all the time - what can be the problem?
The code is very simple. In the player controller there are two functions. one for add mapping context and the other for remove mapping context.
The “loop” is actually not a technical loop - game 7 tells game 1 to set the new camera, remove mapping context for game 7 and add mapping context for game 1. nothing special about the game technique.
It seems like sometimes the event will be “ignored”. I had the same problem in another game too.
The problem is not that it doesn’t work but sometimes it doesn’t work but running the exact same code.
The functions are alright. Seek the issue in the rest of your blueprints. Maybe you are adding the same context twice. Maybe you are not calling an event which is not seen in your screenshots.