Bullet direction changes?

Get help using Construct 2

Post » Mon Jan 16, 2012 7:09 pm

I have my sprite using a custom movement behavior to move about the screen. I have 3 image points that spawn other sprites that have a bullet movement behavior set to -200 so when the sprite is spawned it moves backward from the object.

The problem I am having is that once I rotate the object the spawned sprites move in the opposite direction. Forward not Backward.

Any ideas why this happens?
B
18
S
5
G
3
Posts: 12
Reputation: 4,094

Post » Mon Jan 16, 2012 7:11 pm

Without seeing your CAPX I can just guess that it has something to do with the "ANGLE" of your Sprites and the Bullet
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Mon Jan 16, 2012 7:28 pm

B
18
S
5
G
3
Posts: 12
Reputation: 4,094

Post » Mon Jan 16, 2012 7:30 pm

Set the Angles of the ShipThrustRing to the Same Angle as teh CassieShip!
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Mon Jan 16, 2012 7:36 pm

The angles are set the same. I even tried doing this in actions and setting the ShipThrustRing "Set Angle of Motion" to CassieShip.Angle. Still have the same problem.
B
18
S
5
G
3
Posts: 12
Reputation: 4,094

Post » Mon Jan 16, 2012 7:45 pm

and you are sure, that both angles are the same and that nothing is flipped or mirrored?
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Mon Jan 16, 2012 7:47 pm

Yep, positive. Both are set to 0 angle.
B
18
S
5
G
3
Posts: 12
Reputation: 4,094

Post » Mon Jan 16, 2012 7:48 pm

well, as I said before - bughunting without the CAPX is tough....sorry
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Mon Jan 16, 2012 9:13 pm

maybe, but I'm not sure
[code]on whatever event you want
-> Sprite: Spawn Bullet at image point 1
-> Bullet: set angle to Sprite.angle
-> Sprite: Spawn Bullet at image point 2
-> Bullet: set angle to Sprite.angle
-> Sprite: Spawn Bullet at image point 3
-> Bullet: set angle to Sprite.angle[/code]
This way your bullets should be at the same angle as your spawner sprite, and since you set speed to a negative value, they should go backward as you want (if I'm not wrong)
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Mon Jan 16, 2012 9:57 pm

Big thanks to Weishaupt. He figured it out for me.

He set a System event that at every tick the Sprite set its angle to the ship -180 degrees. Works good now.
B
18
S
5
G
3
Posts: 12
Reputation: 4,094

Next

Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests