i want the object pointed by red arrow to move to the house(pointed by blue arrow) through the ladder(pointed by blue line), how to do it?
NOTE: the ladder and house position can be change depending on where the player want to put it
NOTE: the ladder and house position can be change depending on where the player want to put it
What is the ladder made of? Is it created or drawn using multiple objects or tiles? Is it a single object? Is it multiple overlapping ladders?
The composition of the ladder may help create a strategy of how to follow it.
thankyou for your reply! its a multiple object, player can build the ladder wherever they want. i’m thinking about using pathfinding but that will be so performance expensive cause its need to create a lot of object as obstacle and the agent will not only be one but many. i may decide to cut some of the feature in order to be able to create ladder climbing
Can you explain more on how the ladder is made? Maybe a pic or video? You can post a small gif or a link to a video on say YouTube.
The linked object pathfinder might help but it depends what the ladders are made of.
I kind of like the idea of scanning the ladders and putting hidden objects for the linked objects pathfinder behavior.
The ladder could be drawn on a tilemap object. Then either used with the linked object behavior to create a path or if the non-ladder tiles used a collision then the tilemap could be used as an obstacle with the nav mesh pathfinder.
This is all speculation without a better understanding of the ladders.
If they were individually ladders that could be stretched in length then maybe you could tween from 1 end of the ladder to the other and then somehow to the next ladder.
If the ladder was made of square tiles that snapped to a grid then it might work with the linked object pathfinder.
If the ladder was made of square tiles and the player was forces to draw or added them in a continuous path then the tiles could be given a sequentially numbered ID variable and then it would be a process of just tweening to the to the tile with the next ID. Sort of like following breadcrumbs.
You could have pre-made ladders and navigate the ladder by following custom points on the object.
IDK if any of this is applicable. I’m just brainstorming.
Here’s a video to explain it better
is the object pathfinder you mention different from the one built in Gdevelop?
i’m good with brainstorming i probably will find a way to solve this, this is better than no reply at all
I’ll watch the video. There are examples for the linked object pathfinder. It requires more setup. It uses linked objects to move an object towards a destination. It took me awhile to fully understand it. It’s not as simple as adding obstacles.
https://wiki.gdevelop.io/gdevelop5/extensions/link-tools/
The video helps. If it’s always a straight ladder then you could probably use the platform ladder behavior on the ladder and use some logic to simulate the up key until the top of the ladder. It might help if it was 1 object like a tiled sprite.
Another option is to tween from the first block to the last block.
If the ladders always go from vertical to horizontal to vertical…, then you could try the following:
First, create 2 tiled sprite ladder objects - vertical_ladder and horizontal_ladder. Add an boolean instance variable named “isTravelled” to each ladder object. If you overlap the vertical and horizontal ladders where they intersect, then it makes the moving process a lot simpler:
the ladder can be placed in any way the player want, shaped like word, a house shaped one or anything. and the object that move to the house each of them need to find the shortest path to get to the house through ladder and there’s no way to the ladder then they will just idle
i’ll try to learn the object pathfinder and ill see if there’s solutions to it
If you need help, I’ll try to help. I’ve become comfortable using the linking behavior.
I occasionally post examples here and their projects on github.
These might help
https://github.com/doug13579?tab=repositories&q=Linked&type=&sort=
This is my github
https://github.com/doug13579?tab=repositories
The basic setup is.
You can’t link instances of the same object. So, you add a linking object everywhere there’s an object using for each object.
While you add the objects, you link the existing object to its linking object.
You then use the object linking function that links neighboring objects.
It uses 2 other objects. A mover that has the linked tools pathfinder behavior and a target object.
You place each object on 1 of the tiles. You link each object to the tile it’s on and the matching link object.
You then use the action to move the mover object to the target using the link objects.
Just like the basic pathfinder it has a path found condition that you can invert to use as a path not found.
Using object groups, I’ve simplified the setup on my projects.
It confused me at the beginning but I studied the examples and made my own test projects and It got easier.
I skipped some things. After you move the object you unlink the mover and then relink them to their new position. The same if you move the target.
hey, i want to give you an update, so i’ve been put a lot of hours into the new linked object. i understand how it work and thank you for helping me with that behaviour, i opened the example and the project you gave me, i found solutions and when i think that was the solution i was wrong then i found a different solution then i wrong again untill i get into one conclusion, maybe i should overhaul how the moving object move, i was using physic engine on the objects cause i want to use the physic for certain stuff that related and now if i want to manifest the idea of the objects to be able to move anywhere ill need to use the link pathfinding to move both on Ground and on the Ladder but i got one problem, it seem that it doesnt have an Action to change the Link patfinding Object Maximum Speed. and honestly i dont know what to do about that, should i just ask the Original Creator of the Pathfinding to add an Actions to its?
I’m glad you worked it out. It sounds like you figured out the behavior quicker than I did. It took me a bit as well. A common issue for me was forgetting to unlink objects and the initial setup.
It’s weird that there’s no function to change the speed at runtime. I could only find the behavior speed setting.
I think it would be best to ask for the feature.
I think you want something like this:
Allright thank you! i can learn fast because of your help too
unfortunately no, if i use it, it would need to know where the moving object will go as there’s will not only one moving object or house. the object need to know its path and shall take the shortest. and if there’s no path it will idle