Player wont link with Ball

Hi guys wuzap?(btw i just became a regular!)
So i have a soccer player who will not link with the ball for some reason, unless i misunderstood what it means by link it means to connect right? well i put a condition if player is in collision with ball then link but it dosent.
screenshot down below. :point_down:

Screenshot from 2025-09-11 15-25-46

I don’t really know what the “link” action does, but there’s this documentation
https://wiki.gdevelop.io/gdevelop5/all-features/linked-objects

But if you want to put the ball in front of the player, you can :
Make a point inside the player object (you can call it something like “BallPos”).
Make a variable and set its type to boolean (you can call it something like “BallLinked”) and set it to False by default.
Then, when BlueCharacter1 is in collision with soccerball2, change the boolean variable to True.
And make an event where if the boolean variable is true, then change the position of the ball to the position of the point.

(I’ll put a screenshot later, I guess)

Actually you have download the extension first.

MM yea i think i will try the other way with booleans.

I think you’re talking about the “Linked Object Tools” extension, which is different from the “Link two objects” action.

@asimple_dev @zGameCreator
Link two object is not extension is just action
And its tricky to use
It do matter do you check in condition
Take into account objectA linked to objectB
Or
Take into account objectB linked to objectA

On top of that if you have 1 object that can link to many but only one at a time
You need to un link it first from other objects

When it comes to ball i see a lot of issues
Cause how you gonna tell which player should get linked to ball when multiple players are in collision with ball?
How to select which player should not be linked?

BUT it would vary depending on what game we are talking about?
Foot/Basketball? I would say object linking would cause more issues than good

could you tell me what i have to write in the box for x pos and y pos?

Football.

… (extra letters cause need more then 20 letters)

So it will be tricky
What Asimple_Dev meant

If you create point for example calling it BallPos
And your object is called BlueCharacter1
Then in x and y you type BlueCharacter1.PointX(“BallPos”) BlueCharacter1.PointY(“BallPos”)

But again if 2 characters will collide with ball
How you gonna determine which should have bool var set to false and which to true?

I atm don’t have idea for that
But it is not impossible
For sure there needs to be a way

Umm it worked thanks @ZeroX4. but now if the player
turns right it looks like this. :point_down:

(even tho the point is in front of the player.)

Umm well i could just do none as in they will keep pushing until the ball will slip out of the player/ai’s grasp.

Yeah cause if you don’t have variable to tract direction of player
Then you should have only right animation and when you want player to turn left
You should flip player animation horizontally

And then point would work perfectly fine

TECHNICALLY when 2 payers are close to ball you could just allow them to push the ball freely instead of ball being slapped to some static point

If you have better idea i am all open to it
I for now don’t

umm yea i could but… like idk. yea i guess i could…

But its really hard and well look at this game…

(its not really that easy or fun because you cant control the ball)
(DONT tell donald i said that.)

How do i do that? …

Or just like in fc 25 and fc mobile i can put like a sort of ring around the player…

There is action
Flip animation of player horizontally
And set it to YES for left

You just use it for example when player have Left key pressed

And then you add to your Right key pressed
Flip animation of player horizontally NO

I really have no idea for now how to deal with ball games

Like this?

umm well this code is not working unless i did it wrong. instead its making the player face right when going left.

Now you only need right animation
Left animation and any events to set left animation should be deleted