Impossible to interact with state machines in Rive

Hello everyone, I am trying to use the state machines with the Rive native extension and it looks like go.set doesn’t find any properties bearing the name of the state machine inputs like expected.

rive.play_state_machine("#rivemodel", "main")
go.set("#rivemodel", "running", true)

Although the rive.play_state_machine() actually works in the first place and plays the entry point animation correctly, I just cannot use the inputs. Also rive.play_animation() functions correctly.
Lastly I tried to run the github project with all examples and it just crashes the editor every time I try to open it. It might be due to a compatibility problem since there seem to be a lot https://github.com/defold/extension-rive/issues/53. In the end I thought it might just be that the documentation hasn’t been updated? Or maybe it is my machine having a problem.

Also I was wondering if anyone had any more info about the development Rive native extension? Last release on github was 25 Apr 2022, I am a little concerned because I love the Rive+Defold combo so much I really don’t want it to become obsolete :sob:

We are currently working on the update to their latest runtime, and we should have something presentable in a couple of weeks. The main feature will be textured meshes.

3 Likes

Oh that’s really cool to know! Thank you for responding so fast.

Then do you think my problem is due to a bug? I could fill a github issue if that so, but I want your opinion because to me it looks more like I missed something somewhere :thinking:

I just tested the example project (release 0.2.0) with Defold 1.3.6, and the state machine example works fine.

Click the rocket, and it will set the “Press” input. (see statemachine.script)

I investigated my problems further and for the moment I find no solution, but I made discoveries that might be interesting.

Firstly, I updated Defold to 1.3.6 and put rive-extension release 0.2.0 in my dependencies. No problem there (I previously couldn’t use it with 1.3.5 so I remained in the 1.3.4 version until now)
I then tried to run the example project and unfortunately it still systematically crashes before even opening.
Then I tried downloading the rocket.riv file to see how it ran on my project and the moment I put it in my project also crashed. So in fact, the functional .riv files of the newest examples crash my Defold editor. I tried to import the .riv file in my browser app and export it back again and it still crashes. I then tried to exclude .riv files and Defold.exe from windows Defender and executing it as administrator and it still crashes.

Basically I’ve got either Rive runtimes I made myself that are without state machines, either Rive runtimes that do have a functional state machine but crashes my editor. I don’t really know what to do. I guess I will just not use any state machine then, which is a bummer because they are so convenient!

1 Like