[103] Bug in bullet angle?

Discussion and feedback on Construct 2

Post » Tue Sep 25, 2012 3:41 pm

Hi, usually, when I set the "bullet angle of motion" to 180, it goes left. But sometimes when I run the project, it goes up.

Usually, when I set a sprite bullet angle of motion to 270, it goes up. But right now, this makes it go left.

Am I going mad?

It works for some days, then for no apparent reason, starts going in the wrong direction. Once I fixed it by setting the sprites "set angle" to no in the behavior editor, but now this doesnt fix it either.


B
15
S
5
G
2
Posts: 357
Reputation: 3,691

Post » Tue Sep 25, 2012 5:51 pm

Some trial and error results:

set bullet angle of motion to 180 degrees make it go left.
set bullet angle of motion to 90 degrees make it go right.
set bullet angle of motion to 0 degrees make it go right.
set bullet angle of motion to 270 degrees make it go left.

So it seems that with this object, I can only make it shoot in left or right direction. The object has no anchors, but has a background image pinned to it.
B
15
S
5
G
2
Posts: 357
Reputation: 3,691

Post » Tue Sep 25, 2012 8:45 pm

Well, I tried some other objects, and lots more anlges, and I can only get sprites to move left or right, never up or down.

I even tried angles of say -90 (this goes right).
B
15
S
5
G
2
Posts: 357
Reputation: 3,691

Post » Tue Sep 25, 2012 8:50 pm

Ok, this is very bad, I put a debug statement immediatly after the set angle of motion, and its not getting set.

I.e:

.. INFO -> Set angle of motion 90 degrees
   (text) Debug -> Append "angle="&INFO.Bullet.AngleOfMotion

And the answer:

"angle=0".

???

There are no other statement which set the angle of motion anywhere in the project.

Any ideas?
B
15
S
5
G
2
Posts: 357
Reputation: 3,691

Post » Tue Sep 25, 2012 9:07 pm

Ok, its a pretty big bug, I'm amazed that it hasnt been fixed as I saw someone hit the same bug with R90.

You have to set the speed before you can set the angle. this is like pressing the accelerator before you turn the steering wheel in the direction you want to go!

This means the object will fly off in the wrong direction until its set.

As a workaround, I set the speed to 1, then set the angle, then set the speed to my desired speed.

PLEASE put this in the manual at least as a known bug - I wasted 2 days on this - thats a lot of money for me lost. I was even thinking I would have to write my own version of bullet.

B
15
S
5
G
2
Posts: 357
Reputation: 3,691

Post » Tue Sep 25, 2012 9:37 pm

I have the same problem, it aggravated me. Now I will try yer suggestion!
B
47
S
10
G
6
Posts: 455
Reputation: 8,326

Post » Tue Sep 25, 2012 10:35 pm

Can someone share a .capx? This does not sound like the normal function of the Bullet behavior.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Wed Jan 16, 2013 8:23 pm

I was having the exact same problem today.
I have the latest free version (R114 32bit).
You could even put in an angle of 269.9 or 270.1 and it would go 'UP'. But if you wanted 270, it zips to the left.

So I wanted to submit a CAPX file and reduced the code so it was more manageable.

I was able to recreate the problem fine. Then by accident I closed Construct.

When I reopened it, my sample worked properly and my OLD project worked properly, with an angle of 270 going 'UP'.

Could this shed light on the issue?
If it happens again, I will do my best to recreate it and see if restarting it fixes it.
B
16
S
6
G
5
Posts: 90
Reputation: 4,324

Post » Thu Jan 17, 2013 1:31 am

@aindovin - it sounds like just a mistake in your events. It also sounds like it should only take a minute or two to make a reproducing .capx from scratch anyway.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Mon Feb 18, 2013 6:45 am

Dont know if this works for you guys, but i just had the same problem and i managed (only just now but its been there for a while) to solve it on my project. The order of actions apparently matter. I had a 'death' sprite get spawned on player destroy. That death sprite had a bullet behaviour - I did the spawn action first, then i needed to set off bullet speed and then give it the angle.
B
6
Posts: 30
Reputation: 1,260

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 7 guests