I'm making a multi-jump script, and I've made myself some callbacks to make my life easier, but it seems like the game doesn't like it when I try to dispatch an event inside another event? (At least that is what my best guess is as to what the problem is)
I've uploaded all the required scripts in the zip below, and the relevant script is [mem]doubleJump.js at line 42.
If I remove the dispatchEvent everything is fine, but dispatching an event there, even if there are no listeners, freezes/crashes the game.
I've noticed the same also happens if I try to run an async function at that point.
requiredFiles.zip
I'm making a multi-jump script, and I've made myself some callbacks to make my life easier, but it seems like the game doesn't like it when I try to dispatch an event inside another event? (At least that is what my best guess is as to what the problem is)
I've uploaded all the required scripts in the zip below, and the relevant script is [mem]doubleJump.js at line 42.
If I remove the dispatchEvent everything is fine, but dispatching an event there, even if there are no listeners, freezes/crashes the game.
I've noticed the same also happens if I try to run an async function at that point.
requiredFiles.zip