Ok, I figured it out. I’ll explain the solution I found in case it’s useful to someone in the future. Basically, the issue was that a copy of an object was created, and the rotation around the center object was applied on this copy. However, I needed to build the rotating objects dynamically, as the name of the orbiting objects were the properties of a scene variable of type “structure”:
For the orbits, I used the extension called “OrbitingObjects”, but because it doesn’t allow the creation of an object based on its name, I had to edit the extension so that it creates a copy of an object called “Planet”, and that this planet is transformed to fit the properties of each planet I wanted when the instance was created:
For the sprites, the Planet object has animations:
In the extension, the creation of an instance is done like this:
First, I needed to make sure, for some reason, that the planets don’t get created indefinitely. Originally, the extension controls the number of orbiting objects, using a counter, incremented at each object creation, and makes sure that it doesn’t create more objects than needed. For unknown reasons, my version of the extension was creating only the first planet of the “PLANETS” scene variable. As a consequence, because I’m used to develop in regular programming languages, I used a loop to iterate over each instance and using a boolean object variable on the unique CenterObject I can make sure that the same planet doesn’t get created multiple times.
Finally, for unknown reasons once again, I couldn’t use GetArgumentAsNumber()
in the rest of the sheet because it was always the values of the first child of the “PLANETS” scene variable. By assigning them to the instance of Planet at creation time, I knew it was the right values, so I copied them onto this instance and I access the variables using OrbitingObject.Variable()
instead of GetArgumentAsNumber()
.
It was quite difficult for an easy task, but I guess it’s because I’m not used to no-code.