Sprite angle check and OR problem

Bugs will be moved here once resolved.

Post » Sun May 12, 2013 9:14 pm

Link to capx file.



Steps to reproduce:
1. Run the test
2. Move the mouse around


Observed result:
When the sprite is rotated beyond 90 degrees from 0 it stops rotating

Expected result:
It should keep rotating since r=1

If you disable the event with the angle check and enable the one with mouse button check it works as expected.

I had the same problem if I used the "Is within angles" condition.

Browsers affected:
Chrome: yes
Firefox: yes
Internet Explorer: yes

Operating system & service pack:
Windows 7

Construct 2 version:
r129
    
B
31
S
6
G
1
Posts: 19
Reputation: 3,828

Post » Sun May 12, 2013 11:40 pm

B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Mon May 13, 2013 12:16 am

i may be reading it wrong but the event will continue to run true as long as r=1 or the angle is within 0 and 90. but once both condition when you was making the ship's angle change. which made the angle go beyond 90 degrees and there's no event to handle when r=1 AND angle not within 90-0

which reads like an XOR rather OR


but then idk why the second one works even if r=1 and left click is down at the same time.OrangeTapioca2013-05-13 01:02:31
B
40
S
10
G
5
Posts: 102
Reputation: 6,602

Post » Mon May 13, 2013 6:15 am

So after reading the thread ramones posted I guess it works as designed. My bad. :-/

I guess if I add an "Pick all Ship" condition it would work.
B
31
S
6
G
1
Posts: 19
Reputation: 3,828

Post » Mon May 13, 2013 2:18 pm

"Pick all Ship" is probably a stupid suggestion. :-p

Maybe making r an instance variable of ship and check if the Ship's r variable is set to 1 would then pick the ship.
B
31
S
6
G
1
Posts: 19
Reputation: 3,828


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests