How to make moving platforms in the wick editor

how to make moving platforms in the wick editor

Is this a question, or you will be providing a tutorial about the topic? If is a question, then… it is complex. Moving platforms is not something that you develop alone… you would need an engine of some kind around it. See Baron’s platformer engine project @awc95014 Platformer Engine 2.-1.4.

Then, the question could have more context, if you consider that engine, you could ask how to implement moving platforms into that engine. You could build your own engine first. For instance, you would need to establish some kind of gravity for your player and engine, enemies, static platforms, etc… Then, make the player and enemies jump and interact with the platforms and so on…

a question I just was busy and needed to do this quick

if its only a moving platform that moves from left to right, without any collisions or so, you could always draw the platform and then convert it into a clip, and then apply a code like…

At default script tab:

this.speed = 0.05;
this.distance = 100;
this.initX = this.x;
this.count = 0;

At update script tab (create this one):

this.x = this.initX + this.distance * Math.sin(this.count);
this.count += this.speed;

this part of the code is not working this.count += speed

1 Like

Sorry, I just put this code without testing it… Updated, good catch!
Let me know if worked or not.

ok that is ok

it did not work

It worked for me… if your project is at 12 FPS, then try to adjust the distance to be 100 and the speed to be 0.05
Here is my example…
SimpleMovingPatforms9-4-2020_2-11-01PM.wick (1.8 KB)