Page 1 of 1

How do I get the y-value at a certain x-value?

PostPosted: Sat Oct 07, 2017 10:54 pm
by Fenjia
I wanna access the height difference my player has traveled for each step; as a workaround, I tried to get the Player's y-coordinate at his actual x-position, and the y-coordinate at the previous position x-1.
Can I use Player.Y or Player.ImagePointY for this purpose, and if so: how? Something like "Player.ImagePointY(Player.ImagePointX-1)" did not work out...
Or is their another way to get these coordinates or the traveled height difference?

Re: How do I get the y-value at a certain x-value?

PostPosted: Sat Oct 07, 2017 11:07 pm
by plinkie
When you stand at initial position, you can store the player's Y in a variable. So set value 'variable' as Player.Y. Then in the new position you calculate Player.Y-variable.

Re: How do I get the y-value at a certain x-value?

PostPosted: Sun Oct 08, 2017 11:29 am
by Fenjia
You're right, that's sufficient here. Thank you!