How do i display only the x-value of an object´s position?
3 posts • Page 1 of 1
How do i display only the x-value of an object´s position?
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)?
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)?
- Drachenbauer
- Posts: 18
- Joined: Thu Jun 20, 2019 5:29 pm
Re: How do i display only the x-value of an object´s position?
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)];
- FRA32
- Posts: 229
- Joined: Wed Dec 03, 2014 9:51 pm
Re: How do i display only the x-value of an object´s position?
Thanks, now i can create the right output for my project.
- Drachenbauer
- Posts: 18
- Joined: Thu Jun 20, 2019 5:29 pm
3 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests