min / max system expression help

Get help using Construct 2

Post » Wed Apr 11, 2012 4:40 pm

i want to calculate the lowest and highest x and y position of a bunch of sprites, the objects from where i want the calculation would be selected by mouse, so the amount of sprites is depending on the selection

how would i write this?

do i need an array to do this? if so how would i implement this?


my endgoal is to find out the center of the selected sprites
so i think if i know the above i could calculate the distances and divide by 2 to get the middle point.
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Wed Apr 11, 2012 4:59 pm

Why you need to find the center of the sprite? What are you doing with the hotspot?
B
83
S
21
G
15
Posts: 1,039
Reputation: 15,134

Post » Wed Apr 11, 2012 5:06 pm

the idea is to pin the selected objects to a move/rotate sprite in the middle point of the selection
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Wed Apr 11, 2012 5:14 pm

B
83
S
21
G
15
Posts: 1,039
Reputation: 15,134

Post » Wed Apr 11, 2012 5:24 pm

thanx but its not what im looking for, i want to find out the middlepoint between multiple selected sprites, essentially i want to create a bounding box from multiple spritesvtrix2012-04-11 17:28:41
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], Timedoor Indones and 24 guests