Moving Objects

I am trying to move two pistons on the screen up and down, and want to adjust the speed at which they are moving. Any suggestions?

Create an object piston, make properties x,y,z being the coordonates and at each frame you modify their value and paint the objects at the coordinates you provide.

NewROmancer

I can get it to draw them ok. I t is just that I can’t change the speed at which they are moving.

Originally posted by NewROmancer:
[b]Create an object piston, make properties x,y,z being the coordonates and at each frame you modify their value and paint the objects at the coordinates you provide.

NewROmancer[/b]

What’s a question like this doing on the advanced board?

for pistons going up and down, you probably want to use a sine wave.
displacement = MAX_DISPLACENT * sin(timer() * speed);