Elevators : they don't stop ! [SOLVED]

For questions about using Classic.

Post » Fri Jul 09, 2010 10:10 pm

Hi,
I am trying to set up an elevator system in a platform game but something is wrong :

I have an elevator object (called "ascenseur") with the following values :
* Active ("Actif") : 0 if out of order, 1 if OK
* Moving ("Marche") : 0 if stopped, 1 if moving
* Floor ("Etage") : 0 = down, 1 = up (that is not the Empire State building elevator :mrgreen: )

First I test if the player is on the elevator, if it is stopped, and if the right key is pressed depending of the current floor.
Then I move it with Custom Movement and stop it when it reaches a trigger (called "borneascenseur").

Everything is ok with one elevator.

When I put two of them for instance, the first the player will switch on will work, however the second won't take into account the stop line and will move forever :twisted: .

I tried to do my best with all that pick/don't pick thing, but I missed something :? .

Here is the cap file : [url:krhp7dqu]http://www.sendspace.com/file/g8fu5p[/url:krhp7dqu]
B
4
S
1
G
2
Posts: 30
Reputation: 910

Post » Sat Jul 10, 2010 12:14 pm



To detect when an elevator is leaving its zone I used a collision test with "pick".
With a "don't pick" it worked but I was unable to use more than one elevator at the same time.

I tried with a "for each elevator" in which one the collision test is performed and now everything is OK.

However I still don't quite understand why it works :lol: Maybe someone can enlighten me.
B
4
S
1
G
2
Posts: 30
Reputation: 910


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests