Want to use VisualScript with AnimatableBody2D

I am trying to create a moving platform using AnimatableBody2D.

I checked the manual, and it says that updates are planned for the future.

So, is it correct to understand that, at this stage, there is no way to do it other than controlling it with GDScript?

“Currently, the visual scripting system of ACTION GAME MAKER only supports GameObject nodes based on CharacterBody2D.
Support for lighter nodes is planned for future updates.”
https://guild.rpgmakerofficial.com/t/topic/986

Hello! Yeah, you’re correct that attaching Visual Script directly to an AnimatableBody2D isn’t supported right now.

Have you tried using a blank GameObject (or Area2DGameObject) as the parent and adding the AnimatableBody2D as a child of it? That way the parent handles the Visual Script and the AnimatableBody2D rides along with it. If you needed to change properties on the AnimatableBody2D (or its CollisionShape2D) at runtime, you can do that from the parent’s Visual Script using ChangeObjectProperty. Basically the GameObject can act as the middleman for now.

Give it a try and let me know if it works for your setup!

1 Like

The expected behavior was successfully achieved! Thank you very much.

1 Like