Error with state machine trigger: Failed to establish cursor

I’m just defining a trigger

const resetTrigger = ecs.defineTrigger()

then calling it

resetTrigger.trigger()

and the final place it’s used is in the onTrigger

.onTrigger(resetTrigger, 'nextState')

The error I’m getting is on the second part when resetTrigger.trigger() is called
Error: Failed to establish cursor
at trigger runtime.ts
at stateMachine/< script.ts:89:25
at Gp runtime.js
at gu/A< runtime.js
at tp/< runtime.js
at wM/k/< runtime.js
at k runtime.js
at F runtime.js
at tick runtime.js
at r runtime.js
at ho/< runtime.js
at e runtime.js

It works in one scene but then in another (it’s a component on a persistent entity) it does not. I can share the workspace if that would help to solve the issue :slight_smile:

Hi! Please land your changes and share the project with the support workspace so I can take a look.

Done! To recreate the error set the starting scene to “ui hell” (I apologize for the profanity I was not expecting to be sharing this with anyone :sob::sob:) and build. Then, click the switch button and once the next scene has loaded press the die button. After clicking the big red respawn button it should raise the error. You can also see that it doesn’t raise the error in the first scene by just clicking die without clicking the switch button to switch scenes. Thanks in advance!

Taking a look at the project, However looks like you fixed it? :open_mouth:

Hm nope, just tried it out and it’s not working for me… what kind of behaviour are you seeing after clicking the red respawn button? It should refresh the scene but I’m having it hang after it all goes grey.