How do I display the angle of an object in text?

Get help using Construct 2

Post » Fri Mar 21, 2014 12:57 am

Hi
I want to have text on my screen that displays the angle (in degrees) of an object.

i.e. set value of text to: object.angle

Couldn't find the syntax for it, any one know the syntax or a round about way?

Thanks guys :lol:
B
2
Posts: 3
Reputation: 156

Post » Fri Mar 21, 2014 1:52 am

You are correct. You might wan to use something like floor(Object.Angle) to get rid of all the decimal places.
So:
System > Every tick : TextObject > Set text to: floor(Object.Angle)

You could dress up the text with:
"Current Angle: " & floor(Object.Angle)
Which would display as:
Current Angle: 56 (Of course the number would be whatever your current angle is.

Have a look at this:
You do not have the required permissions to view the files attached to this post.
B
17
S
4
G
3
Posts: 172
Reputation: 1,933


Return to How do I....?

Who is online

Users browsing this forum: dop2000, LunaticCat and 8 guests