Skip to content

Dispatching an event from another event crashes the game? #106

@ZH-Hristov

Description

@ZH-Hristov

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions