"Add/Remove mapping context" Not always firing

Hello,

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?

we’d need to see code by the issue may be how you handle the ‘loop’

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.

yeah i get what you mean but its still more likely the error is here, like you said your function is simple its very unlikely thats the problem

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.

I will make some tests and let you know. If the code is right but the problem still happens, i will make a bug report.