Get the min Y of list of physics box

Get help using Construct 2

Post » Mon Oct 29, 2012 9:26 pm

Hi,

i v created a grid of physics box in 6*12 and when i click with the mouse on a box , it destroy it and that make fall down the group of box. I want to do a smooth vertical scroll to have the center of screen on the min Y position of the group of box but i don't find the best function to return it.

For the moment i use :

Every tick > system > set scroll Y to lerp(scrolly, Sprite.Y , dt)

I have smooth scroll but not on the min box Y .

Ty for helps
B
3
Posts: 3
Reputation: 281

Post » Mon Oct 29, 2012 9:35 pm

Use the for each (ordered) condition to pick the lowest

+For each Sprite, order by sprite.Y descending
     -> Stop loop
     -> ScrollY to lerp(scrolly,Sprite.y, dt*Speed)
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Mon Oct 29, 2012 11:31 pm

Ty it s work
B
3
Posts: 3
Reputation: 281


Return to How do I....?

Who is online

Users browsing this forum: blackhornet, makkancs, TiagoCesar and 17 guests