OK, I’m working on making a camera similar to the one in Super Smash Bros. The camera in that game (during game play) zooms in and out of the screen so you can see all the characters on the screen at all times. Since the levels are sometimes big they zoom out instead of scrolling the screen when people go off screen and zoom in wen a lot of the screen isn’t being used.
Now for the problem:
I could easily use the distance formula between the people:
xx = x2- x1
yy = y2-y1
[COLOR=#0000ff]d = Math[/COLOR].[COLOR=#0000ff]abs[/COLOR]COLOR=#000000[/COLOR];
but the game will have more than 2 people around.
Solution:
My camera will work by zomming based on the distance between the distance between the person with the highest _x and y values and the person with the lowest.
I just need a way to loop through all their values and return the lowest and highest values.