Issue with moving Platforms.

In the old game maker, you could just set the object to solid and then set the speed and what not.

In the new version of game maker, when an object is set to solid it can no longer move, as well as any object that colides with the object is also unable to move.

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

I want to know how to get the moving platform to work properly, any way to fix this issue.

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 

TsukaYuriko

☄️
Forum Staff
Moderator
I'm not aware of the way solid works having been changed in between any recent version... that should still be resetting the position of anything that collides with a solid and having a collision event with it being reset to its previous coordinates, like this:
GML:
if (place_meeting(x, y, obj_solid))
{
    x = xprevious;
    y = yprevious;
}
So a solid instance, on its own, should definitely be able to move. If it isn't, something else is preventing it from doing so.

Generally, there are a few things to keep in mind with moving platforms:
You don't want to have any gaps in between the player and the platform once the player is on top of them, so make sure to check ahead whether you will be standing on top of one (or in one) after applying movement. If so, move just the right amount to be directly on top of, but not inside of it.
While you're standing on top of one, you don't want to have gravity modifying your vertical momentum at all.
Instead, you want to directly add its horizontal and vertical momentum to the player's position.
 

Yal

🐧 *penguin noises*
GMC Elder
"solid" means, and has always meant, "if this object is involved in a collision, undo both involved instances' movement this step". It's a very crude way to prevent objects from going through each other, and usually causes more problems than it solves (at least as soon as the solid objects start moving around on their own).

The best way to make moving platforms is to have them move in the end step event, and move them by teleporting them around (setting x/y to your own speed variables). During the step (when normal movement happens) the platforms will seem like they're inert, solving both the solid-unmove issue and issues where the execution order matters.
 
Top