Get player velocity? [SOLVED]

Get help using Construct 2

Post » Tue Sep 13, 2011 9:06 pm

If using the Platform behavior, how do I get the object's velocity to use in an expression? Also, where can I get a reference on how to use expression in Construct.kabuto2022011-09-14 19:31:11
B
5
S
2
G
3
Posts: 36
Reputation: 1,622

Post » Tue Sep 13, 2011 11:02 pm

The platform behavior has 'Speed' and 'MovingAngle' expressions which describe the velocity in polar coordinates, and 'dx' and 'dy' expressions which describe the velocity in cartesian coordinates.

We're still working on the manual - when it's done it will cover expressions!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Wed Sep 14, 2011 7:30 pm

Appreciate the help!
B
5
S
2
G
3
Posts: 36
Reputation: 1,622

Post » Wed Nov 09, 2011 12:37 am

Sorry for digging this out, but I tried to use the angle Expressions to set my player angle.

After some thinking I resorted to use the Platform.VectorX expression (glad to hear hints for improvement, this is my second day with Construct and graphical programming in general).

But while experimenting with the angles I noticed something I don't understand:
when walking to the left and jumping, the angle seems to be >270 at first.
How come?
The capx shows what I mean: the green/yellow blocks indicate which angles are present.

P.S. Sorry, don't have Dropbox (yet).bUbU872011-11-09 00:40:17
B
5
G
2
Posts: 11
Reputation: 1,181


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 22 guests