"Elevator Action" Moving Lifts

Get help using Construct 2

Post » Sat Mar 21, 2015 7:21 pm

Hey guys!

I'm developing a small platform game for college. Many things have already been programmed, except the platform lifts. They must be similar to Elevator Action's lifts, but I don't know how implement it using Construct.

Could someboy please help me with that, I'm still learning Construct - this is actually my second game! :D

Many thanks!

GuiReis.
B
5
Posts: 11
Reputation: 247

Post » Sun Mar 22, 2015 5:08 am

Hey Gui,

Luckily you have a ton of options, how simple you want to go is up to you. I would recommend looking up "lerp" from the tutorials or manual. You could also easily achieve it with an elevator that has the bullet behaviour attached.

If you get really stuck on it I would be happy to help, just post up your progress capx
ImageImage
B
89
S
18
G
6
Posts: 1,049
Reputation: 11,165

Post » Sun Mar 22, 2015 9:17 pm

Message: brick334 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
So basicly, I tackled what I think is what you wanted. An elevator that goes up and down, only stopping at each floor automatically. The elevator can be called and then the player can get on and take you between levels.

The way it works is a tandem system where one object drives another object, periodically. That is,
sprite (A) moves every three second a given distance. Sprite (B) scrolls to it smoothly and stops. Repeat.
Sprite (B) is the elevator and so Sprite (A) is the motor. However, we have to take into account that the Elevator is always in one of three states: Up, Down, and Call, where call is the only state triggered by the player.

so, when the level loads, we set the initial state to Down. Which drives the motor to snap between floors. Once it makes it to the bottom most level, it changes to Up state. If the player "Calls" the elevator, the motor is instantly snapped to the floor that the player is on. Remember, the motor can snap anywhere, but the elevator will always smoothly scroll.

I've attached a capx with notes on it.

I also encourage anyone else to see if they can make it better. I feel that, although I got the end result, that it could be a bit tighter. But hey it works.

http://www.datafilehost.com/d/a4b57cf4
B
9
S
1
Posts: 15
Reputation: 670


Return to How do I....?

Who is online

Users browsing this forum: alajajm, Draconiz717, Fenix18, GlassCanon1993 and 9 guests