So I've seen a lot of AlmightyZenTaco's YouTube videos on CF2.5. They're great, especially for a noob like myself, but I'm interested in making a hybrid of two of his tutorials: Moving Platforms and Sine/Cosine Movement. What I'm trying to do for my game is have moving platforms that follow sine/cosine movement. I have succeeded in making them animate properly in left/right, up/down, diagonal, and circular motions; however, I can't get the collisions or movement right with the Platform Movement Object. In AZT's moving platform tutorial, he shows how to achieve proper PMO movement with a "platform indicator" object that's attached to the PMO. My only guess is I need something like this for these new platforms. If so, I just don't know how to do it. If anyone could help me out with this endeavor, I'd greatly appreciate it.
For reference, here is the behavior of the circular "platform":
Start of Frame, platform
-> Set CenterX to X("platform")
-> Set CenterY to Y("platform")
Always, platform
-> Set X position to CenterX("platform") + Cos(timer / Time("platform")) * Amp("platform")
-> Set Y position to CenterY("platform") + Sin(timer / Time("platform")) * Amp("platform")
And here is the behavior of a diagonal "platform":
Start of Frame, platform
-> Set CenterX to X("platform")
-> Set CenterY to Y("platform")
Always, platform
-> Set X position to CenterX("platform") + Sin(timer / Time("platform")) * Amp("platform")
-> Set Y position to CenterY("platform") + Sin(timer / Time("platform")) * Amp("platform")
AZT tutorials:
Moving Platforms - Please login to see this link.
Sin & Cos Movements - Please login to see this link.