Ok let’s say I have four bear cubs and four beds, one for each cub.
Each bed and bear cub has an ID from 1-4. Cub ID 1 needs to move to bed ID 1, cub 2 goes to bed 2, cub 3 to bed 3 and so forth.
How can this be achieved in Gdevelop? I have tried several ways but could not pick the right bed, all four cubs would either go to one bed or not move at all.
Can you post a screenshot of what you tried? Are there obstacles? You can use force, Tweening or the Pathfinder behavior. The pathfinder behavior would be easier and more natural looking. It depends on if you have obstacles and how you want them to move.
I would split the actions. Unless the destination changes or something else can change and block the path, you don’t need to repeatedly trigger the move action. The pathfinder move action can use a lot of resources.
It’s also best to test if a path was found. In my example, it doesn’t change the boolean unless a path was found. That way, it would keep trying to move until a path was found. That’s only needed if a path could be blocked. Otherwise, you could just immediately set the boolean to true.
I also added a 2nd boolean so it ignores bears already in bed.
For testing, I used a mouse down to start things.
Typo. I had a variable condition instead of action.