You can use the X/Y positions functions to modify any object. Bear in mind that the origin (the point x=0, y=0) will be found in the top left corner of the frame. The X will proceed from left to right, and Y from top to bottom. In normal cartesian coordinates it would have an inverted Y axis. So this might seem odd at first.
When you are in the expression editor (what pops up when you access the "Set X position" command), you can use the "retrieve data from an object" button to access a list of objects. Click on your platform, and you can retrieve its current X position.
Your biggest problem, however, will be that while the platform can move all it wants, your player will not go with it. It will slide to the right and the player will simply fall off of it. To counteract this, you can create a small object, which you use the "Set x position" command set to just below your characters feet. Then, add an event saying "If this new detector object is overlapping a platform, set your characters X position to his X position + 3. This way your character will move along with the platform.
You can use the X/Y positions functions to modify any object. Bear in mind that the origin (the point x=0, y=0) will be found in the top left corner of the frame. The X will proceed from left to right, and Y from top to bottom. In normal cartesian coordinates it would have an inverted Y axis. So this might seem odd at first.
It's because a CRT draws the lines from the top downwards. Thus Line 1 is the first drawn, followed by line 2 and so on.
Anyway, do you use a custom engine or the default platform movement? If the latter, then you should make the active stop on collision with the platform (it was a while since I used the built in platform movement though...). If you have a custom engine (recommended) add a negated "while player is overlapping platform" to the "gravity event" or something (depends on how your engine is written). However this will not make the character follow the platform! The unprofessional method I used in my earliest games (because I used the built-in path movement) was to set the X,Y of the player according to the positions of the platform. A more professional way is to move the platform and player in the same event
+While Player is overlapping platform
-Set X Player to X Player +1
-Set X Platform to X Platform +1
This will make the player and platform move to the right while the player is on the platform. However, the platform will be still while the player is not on it.
+NOT While Player is overlapping platform
-Set X Platform to X Platform +1
Now this will make the platform move when the player is not on it. However it still only moves to the right. You can use an alterable value to determine which way it should move, like this
+While Player is overlapping platform
AND Alterable Value A of platform is 1
-Set X Player to X Player +1
-Set X Platform to X Platform +1
+While Player is overlapping platform
AND Alterable Value A of platform is 2
-Set X Player to X Player -1
-Set X Platform to X Platform -1
And so on...
- Ok, you must admit that was the most creative cussing this site have ever seen -