Page 1 of 1

How do i display only the x-value of an object´s position?

PostPosted: Thu Jul 25, 2019 11:24 pm
by Drachenbauer
Hello

I´m creating a long-jump-contest for my Angry Birds marbles.
The jump-point is at the 0-position of the scene.
So i want to display the x.value of their position on the sand-place, if they collide with it.
But how do i extract only the x value from the position thing in the script-menu (i only managed to display both values in square brackets)?

Re: How do i display only the x-value of an object´s position?

PostPosted: Fri Aug 09, 2019 7:23 pm
by FRA32
pos(0) is X, pos(1) is Y. This applies to all square brackets, always starting from 0 for the first. Keep in mind that pos(0) = 9 would NOT work, as square bracket content is read only, unless you replace everything at once using pos = [9,pos(1)];

Re: How do i display only the x-value of an object´s position?

PostPosted: Sun Aug 11, 2019 6:06 pm
by Drachenbauer
Thanks, now i can create the right output for my project.