Elevators : they don't stop ! [SOLVED]

This forum is currently in read-only mode.
From the Asset Store
Tap the ball, control it, avoid touching spikes and score higher!
  • 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 )

    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 .

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

    Here is the cap file : http://www.sendspace.com/file/g8fu5p

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • <img src="http://img13.imageshack.us/img13/6777/solvedc.jpg">

    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 Maybe someone can enlighten me.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)