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

Just started using Construct 2? Post your questions here

Post » Sat Oct 07, 2017 10:54 pm

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?
B
7
Posts: 4
Reputation: 310

Post » Sat Oct 07, 2017 11:07 pm

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.
B
47
S
17
G
81
Posts: 2,230
Reputation: 48,107

Post » Sun Oct 08, 2017 11:29 am

You're right, that's sufficient here. Thank you!
B
7
Posts: 4
Reputation: 310


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest