I just started using GDevelop yesterday and I think I was able to do things on my own, but I got stuck with this one. I want the player to be able to push around pillars. These pillars span 3 tiles high and are made of 3 separate images.
I have an object group named Pillars, consisting of the parts of the pillar. I put in a force to the pillar whenever the player collides with it, but they get pushed separately instead of being pushed as a whole.
the reason is, that your player is not in collusion with all pillarparts.
you can work with links and link 2 pillar parts to the bottom pillar part.
or you can work with variables. give the 3 parts a variable (id for example) with the same value.
then check collision only to the bottom pillar part.
and move all parts that are ether linked or have the same id.
Thanks for the reply. I’ve tried both variable and grouping and I still have a problem, though a different one this time, two actually.
First one is, the other pillars move too. Checking for collision on the bottom part and moving the group works (same one with the variable), but the other pillars also move when I push one pillar. Interestingly, the pillar I’m pushing moves in one piece, but the other pillars leave the bottom part behind. Maybe because the other pillar bottoms aren’t exactly colliding with the player?
Second one is, the pillars doesn’t seem to follow the direction of the player’s push. I was pushing upwards, but they move to the right.
thats why you need to give each stack of pillars a uniqe id, so only the pillar group with the proper id is pushed.
secondly, look what i have written in my screenshot for forces (i was aware ure gonna need it ;D )
Can you elaborate more on this one? Do I give each stack a different variable, like say, pillarA_id for the first pillar, pillarB_id for the second one, etc? I’ve tried it and it still moves the other pillars.
^ I was trying for the unique ids here. My first pillar has pillarA_id, but pushing other pillars still moves the first pillar.
You’re talking about Player.TopDownMovement::Angle(), right? I just got it working, thanks! I removed TopDownMovement because I wanted to use WASD keys, turns out I left the “Default Control” box checked for too long. I added it back in and the pillars move according to the player direction now.