After a long time I came back to A wild sprite project and moving foward with what is gonna take a long time to complete the full idea I have in mind.
But let's not get ahead of ourselves and start with a small change that I'm so happy it finally worked. For the Ropesnails I had used the code from Shaun Spalding tutorials that worked wonders for making this interactable rope point from where the player can swing and jump around.
I dared not modify the code too much because I always encountered some degree of game breaking errors and so they are still imperfect in some way but today I made the first step in the right direction.
In the project I want to add many ways to move around not strictly necessary but for the curious player to explore. I'm adding something strange for a platformer as in a fairy controlled by the mouse(and when I'll make it work by the right analog stick on the controller)
and as you can see in the video for now the first thing that will be used of is to interact with this Ropesnail that stand on this grey circles. The process was very long and frustrating but in the end I pulled the right string and it work perfectly except for one little thing wich is when the player get dragged onto a solid body will be then after pulled through instead of stopping.
Here's the mostly complete code for the Rope
We start by defining when the rope is created by defining the distance from the player to the rope parent and if the key to activate it is pressed.
Then the difference beetwen the obj_snailMove wich is the new, moving one and the classic ropeparent. In both cases we define the position of the anchor and the player anchor to create the rope in beetwen. And finally changing the player state to the swing state.
Here is the swinging state and where the moving snail had to be sorted out. After many tries defing at the start of this state the grappleX and grappleY positions to the nearest obj_snailMove did the trick, now the player can swing around while being dragged around.
I wanted to make a video showing the progress but the Step event of the player is kinda of bugged out and so ctrl + Z won't work anymore and so I left it this way and was a bit scared of going back and replicating the errors.
Have a good week start and stay fresh for me that I'm actually evaporating in this hellish weather 🤒