Move to Layer ERROR

Bugs will be moved here once resolved.

Post » Sun Nov 10, 2013 11:03 am

Link to .capx file (required!):
https://drive.google.com/file/d/0B0mwFXeygaVdZTF2SzdVQ05yY1E/edit?usp=sharing

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
B
174
S
26
G
15
Posts: 18
Reputation: 17,070

Post » Sun Nov 10, 2013 11:33 am

This is fixed version of the project you have sent (working):

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

This is only a z-order problem, not a bug.
B
11
S
2
G
1
Posts: 25
Reputation: 1,685

Post » Mon Nov 11, 2013 7:52 pm

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.
Scirra Founder
B
402
S
238
G
89
Posts: 24,644
Reputation: 196,095


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests