Move to Layer ERROR

0 favourites
  • 3 posts
From the Asset Store
Use this game pack to create your own game, modify the existing game or simply take a look and see how it was made.
  • Link to .capx file (required!):

    drive.google.com/file/d/0B0mwFXeygaVdZTF2SzdVQ05yY1E/edit

    Steps to reproduce:

    1. Put a TiledBackground image in the Layer 0 and rename this layer to Background.

    2. Insert a new layer and rename it to GameObjects.

    3. Go to Layout 1 and put the Box Sprite in the scene.

    4. Wiht the CTRL pressed, left click buttom mouse over the Box Sprite and drag it. Repeat again to obtain 3 box in the scene over.

    5. Create a new layer and rename it to TestLayer.

    6. In the Layout1 add a Mammoth Sprite over the Box Sprites.

    7. In the Event sheet 1 click in Add Event.

    8. Select Mouse.

    9. Select On click.

    10. Select Mouse button: Left

    11. Select Click type: Clicked

    12. Press Done button.

    13. Click in Add action.

    14. Select Mammoth.

    15. Select Move to layer.

    16. In the Layer complete with the number 1.

    17. Press Done.

    18. Click in Add Event.

    19. Select Mouse.

    20. Select On click.

    21. Select Mouse button: Right

    22. Select Click type: Clicked

    23. Press Done button.

    24. Click in Add action.

    25. Select Mammoth.

    26. Select Move to layer.

    27. In the Layer complete with the number 2.

    28. Press Done.

    29. Save the project.

    30. Press F5 to see the results.

    Observed result:

    In the browser, when I click with the left mouse button or right mouse button, NOTHING happens

    Expected result:

    When the user click with the left mouse button, the Mammoth Sprite must stay behind of the Box Sprite.

    When the user click with the right mouse button, the Mammoth Sprite must stay ahead of the Box Sprite.

    Browsers affected:

    Chrome: yes

    Firefox: yes

    Internet Explorer: yes

    Operating system & service pack:

    Windows 7 Professional 32 Bits

    Service Pack 1

    Construct 2 version:

    STANDARD EARLY

    Release 149

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is fixed version of the project you have sent (working):

    dl.dropboxusercontent.com/u/82053952/exemplo_fixed.capx

    This is only a z-order problem, not a bug.

  • Closing as not a bug: the 'move to layer' action moves the object to the top of the given layer regardless of its old Z order. Add a 'move to bottom' action to get the effect you want.

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