Can a turret shoot to a 0,0 paralax layer ?

Get help using Construct 2

Post » Sun Jan 11, 2015 9:24 pm

Very hard question. Maybe somebody has a solution. I have a player ship on top layer with paralax 0,0. I have a scroller sprite to make the screen scroll horizontally. since my ship is on paralx 0,0 it can fly in all the screen arround and in the same time the entire environment is side scrolling. I have a turret. But it is not shooting on the ship since it seems for the turret that the ship is very far away for the paralx 0,0. If i put a super big number in RANGE, it shoots...but NOt on the ship.... is there a solution ?
B
37
S
16
G
2
Posts: 447
Reputation: 4,860

Post » Sun Jan 11, 2015 9:38 pm

Easier solution is to have the ship on the base layer and move it at the same speed as the scroller, like simply every tick set its X position to X + DT*16 and do the same for the scroller. That way you can still move it all over, but if there's no input it flies forward.
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646

Post » Sun Jan 11, 2015 9:50 pm

Hi thanks a lot for you help, could you add a capx file please ? it's 2 days that i am glued to my pc without results...maybe U saved me :)
B
37
S
16
G
2
Posts: 447
Reputation: 4,860

Post » Mon Jan 12, 2015 7:16 am

please can U post a sample file ? thanks a lot
B
37
S
16
G
2
Posts: 447
Reputation: 4,860

Post » Mon Jan 12, 2015 7:43 am

There you go - ship is on the same layer as the turrets, you still have full freedom of movement, it just moves forward with the scrolling.
You do not have the required permissions to view the files attached to this post.
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646

Post » Mon Jan 12, 2015 10:44 am

Thanks a lot that was amazing. Only if u should have time. Could U show me also the same sample with canvastolayer and layertocanvas ? somebody told me that it is also a solution. but as new commer i did understand...zero of all that.

THANKS SO SO MUCH ! very helpful !
B
37
S
16
G
2
Posts: 447
Reputation: 4,860


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], Malhog, plinkie and 11 guests