[SOLVED]Bullet Direction

Get help using Construct 2

Post » Wed Jan 04, 2012 9:19 pm

Hi, I'm new to Construct. I've gone through most of the beginner tutorials but I still can't figure this out!

I have a basic platformer. The character has the platform behavior. The bullets work but will only shoot one direction no matter what.

Example: If the character is facing right, the bullets shoot right. If the character is facing left, the bullets shoot right. @_@

I thought I could fix this with some kind of check when the bullet button is pressed, but I just can't figure it out.

Any help would be extremely appreciated! fwade872012-01-04 21:38:24
B
5
G
1
Posts: 13
Reputation: 659

Post » Wed Jan 04, 2012 9:24 pm

If you're using the bullet behavior just set the bullet's angle to the player's angle.
B
104
S
32
G
18
Posts: 4,759
Reputation: 22,503

Post » Wed Jan 04, 2012 9:27 pm

Or set the angle of the bullet according to if the sprite is mirrored or not.
If mirrored => 180, if not => 0

This should do the trick.

There's at least one example in the how do I FAQ but I can't remember if it is up to date or not.
Moderator
B
154
S
53
G
28
Posts: 5,415
Reputation: 41,360

Post » Wed Jan 04, 2012 9:27 pm

How exactly would one do that? I'm checking the bullet behavior setting and the only option is "Set Angle - Yes or No".

Would I need to do this with an action?

Sorry for my silly questions.

EDIT: I didn't see the reply above this one, let me check it out! Thanks for the help guys.

OK, I found the help I needed: http://www.scirra.com/forum/platform-game_topic46666.html

Seems this has been asked before. Sorry!fwade872012-01-04 21:29:29
B
5
G
1
Posts: 13
Reputation: 659


Return to How do I....?

Who is online

Users browsing this forum: AnD4D, captainhelias, erdrako, granpa, Guddno, honeben, Norbingel, scott7788, Snowmane and 1 guest