I tried creating an action for climbing up and down a ladder by referring to this tutorial.
The mechanism is that when overlapping with a ladder made of tiles, the area variable changes, and pressing up only moves the character while that area variable is active.
However, with this method, if the climbing action is triggered at the very edge of the tile, the character appears to climb while sticking out of the ladder, which looks very unnatural.
Is there a way to forcibly move the character to the center of the ladder whenever transitioning into the climbing state? I would appreciate any advice you could provide.
Would it be possible to try out the Ladder Sample?
Since this is a sample with a tile size of 16x16, you might be able to adapt it to your game’s tile size by adjusting the values within the action.
*Addendum
Starting with AGMaker 1.3x, a custom action feature has been introduced,
and we have also prepared a mechanism to simplify tedious actions.
If all goes well, we hope to be able to introduce a dedicated action for “<>” here.
I encountered a similar issue, and my approach was to use the “Move Object” action on a physical object for alignment.
For example, if “Ladder” is an object, when the player comes into contact with the ladder and presses Up, it triggers the “Move Object” action.
In the “Move Object” settings, specify the center point offset for X and Y. This should be determined based on the ladder’s center point.
Then, set the movement speed to reach the destination in 0 seconds, which essentially means teleporting.
With this setup, when the player reaches the ladder and presses Up, they will subtly teleport to the center of the ladder. This achieves precise alignment.
Thank you. I followed the sample and adjusted it to the tile size of my own project. However, while the ladder check branched to X-, it never branched to X+.
Just to be sure, I copied and pasted the states from the sample visual script and only changed the tile size values, but it still did not branch to X+.
It might be a poor fit with my project, but the sample states use very complex commands. I am not good at calculations, so I may find it difficult to understand how they work.
Thank you so much for taking the time to create this for me.
I tried using it right away, and the result was the same behavior as when I reproduced the sample state. It seems there might be a conflict with some configuration in my project.
When I reproduced the sample, the Xkeep variable was always negative, so it didn’t branch into the X+ state. The issue likely lies there, but it’s quite tricky.
I’ll think about other compromise solutions and explore more options.
So, when a player accesses the ladder, they are teleported to the nearest waypoint set on that ladder?
If the positions for climbing up and down the ladder are fixed, that shouldn’t be a problem. However, if players can access the ladder at any time while falling or jumping up from any point on it, it seems difficult to manage. What do you think? Please let me know if my understanding is incorrect.
You make a valid point. My approach only works for trigger recognition at fixed positions and cannot allow for freely changing contact points mid-process. It seems this isn’t a good choice.