How to make a vertical lift or elevator in a platform game
I am creating a side scrolling platform game using the book "Flash Game University" by Gary Rosenzweig.
My protagonist has an instance of "hero".
My current issue is trying to create a lift or elevator to carry the player up or down. The lift is not covered in the book. My thoughts were that the lift constantly moved up and down at a pace determined by a timer. I cannot get my lift to move. I have created a movie clip called "lift" and made it exported for action script. I can make it act similar to a floor movie clip so that I can stand on it, but I cannot get the lift to move on the y axis.
I tried creating a new function called lift() and using a for loop to count between 0 and 100 using a variable "i" and then make my lift move up 1 unit for each loopcycle. It didn't work.
lift.y -= lift.y - 1;
Does anyone have a better solution?
Thanks,
Alex
