Angle is greater / less than

Get help using Construct 2

Post » Sat Dec 16, 2017 5:04 am

Hello, hope someone can assist

in construct classic, there was the "angle is greater than" condition, but now its gone.

whats the C2 syntax for

angle is greater than 6
angle is less than 6

I'm a bit lost as to the new implementation and not very math inclined..

Thanks
B
25
S
8
G
6
Posts: 232
Reputation: 3,829

Post » Sat Dec 16, 2017 6:14 am

An angle is just a number, so you can use Compare two values, and pick the comparison type.
ImageImageImage
B
71
S
22
G
274
Posts: 3,826
Reputation: 151,295

Post » Sat Dec 16, 2017 7:17 am

I understand that, but I need to know the syntax useage example using the new angle events "is between" or "is within"

thx.
B
25
S
8
G
6
Posts: 232
Reputation: 3,829

Post » Sat Dec 16, 2017 10:21 am

Note that in "Is between angles" event the first angle is inclusive, while the second is NOT inclusive.

So "Is between angles 10 and 20" means "10<= angle < 20".
If the angle is exactly 20 degrees, this condition will be false.
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
127
Posts: 1,768
Reputation: 67,857

Post » Sat Dec 16, 2017 10:25 am

dop2000 wrote:Note that in "Is between angles" event the first angle is inclusive, while the second is NOT inclusive.

So "Is between angles 10 and 20" means "10<= angle < 20".
If the angle is exactly 20 degrees, this condition will be false.


@dop2000 Thanks for responding. Can you possibly give me the syntax for "if angle is greater than 6" just so I can understand it clearly? thankyou.
B
25
S
8
G
6
Posts: 232
Reputation: 3,829

Post » Sat Dec 16, 2017 11:37 am

System -> Compare two values -> angle>6

"angle" can be sprite.angle or angle(x1, x2, y1, y2) or some other expression.
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
127
Posts: 1,768
Reputation: 67,857

Post » Sat Dec 16, 2017 12:10 pm

Ah, thankyou, I was under the assumption I had to use another condition, now I understand!
B
25
S
8
G
6
Posts: 232
Reputation: 3,829


Return to How do I....?

Who is online

Users browsing this forum: Exion and 8 guests