# scrolling camera / maths help

### » Wed Apr 02, 2008 8:07 pm

@deadeye - yep like they say "The darkest place is under the candlestick."

Also i found quickly solution becouse i was experimenting with .XY function.
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

### » Wed Apr 02, 2008 8:09 pm

The distance and angle expressions are meant to accept a two-parameter overload with a two-element array {x,y} defining each coordinate so distance(obj1.xy, obj2.xy) would work (as would distance({0,0}, {10,12}), but something seems broken there. It's a slightly quicker way of typing object distances.
Scirra Founder
B
355
S
208
G
71
Posts: 22,832
Reputation: 176,700

### » Thu Apr 03, 2008 1:30 pm

Trust me to always turn up a bug.

Thanks guy's for your help, much appreciated.

On a side note i did try writing it the other way but i must have been entering it in wrong becaus eit keep bringing up a message saying the parameters were wrong.

I know when i start typing in global('whatever') a hint box appears telling me how to complete the command parameters, but this didnt.

Unless i've missed something it would be an enormous help to have an example appear in the expression editor window when you type ina command. As it happens all i had was "distance (distance)", which wasent much help.
B
37
S
19
G
18
Posts: 610
Reputation: 10,223

### » Thu Apr 03, 2008 2:18 pm

[quote:1afr08yf]Unless i've missed something it would be an enormous help to have an example appear in the expression editor window when you type ina command. As it happens all i had was "distance (distance)", which wasent much help.[/quote:1afr08yf]

That's a bug which is fixed in 0.94. The intellisense doesn't work in 0.93, but in 0.94 is back, and would show distance (x1, y1, x2, y2).
Scirra Founder
B
355
S
208
G
71
Posts: 22,832
Reputation: 176,700

Previous