How do I solve this problem

Get help using Construct 2

Post » Mon Oct 20, 2014 6:14 pm

I'm sorry for this Question , im a beginner and i have a big problem.
My platform character is shooting bullets with a pistol and i want to make it to shoot bullets in front of him.
If i press "D" it will have the face in right and it will shoot bullets in right.
But if i press "A" it will have the face in left but shoot the bullets in right. :(
Notice :
It has tha Animation "mirrored" (Set Mirrored)
and I try to make him shoot left with this:
Player is mirrored -> set bullet angle 180
Problem when i shoot and quickly turn the bullet wich was shoot come back in the other position
What must i do ? to shoot like right , left ? :cry:
B
11
S
3
Posts: 277
Reputation: 1,395

Post » Mon Oct 20, 2014 8:28 pm

When you do "Set bullet angle 180", make sure that, in the same event, you are creating the bullet before you set the bullets angle, so that Construct 2 knows which bullet to pick to change the angle of.

So lets say "Space" shoots a bullet, it should look like:

"Space" is pressed
Is Mirrored
Create object "Bullet"
Set Bullet angle to 180

"Space" is pressed
Is NOT Mirrored
Create object "Bullet"
Set Bullet angle to 0


[You could make this into sub events to be efficient but it's not important :P]

What this does, is when you create the "Bullet", Construct 2 then focuses on that particular bullet and WILL NOT affect other bullets.
If you did this as an event instead:

"Space" is pressed
Is Mirrored
Set Bullet angle to 180
Create object "Bullet"


Then it will first detect all bullets and set their angle to 180, THEN create a new bullet and not even set its angle!

Hope this helps.
B
51
S
20
G
10
Posts: 571
Reputation: 9,819

Post » Mon Oct 20, 2014 8:48 pm

In order of actions sequence you should also set the bullet speed before you give it in angle (if you have it set to 0 by default).
Also keep in mind that a negative speed is left and positive speed is right. While this doesn't matter since your setting angle, I add it in case you ever want an object being moved with a bullet event to go from right to left, the bullet speed will need to be negative unless you set its angle manually.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
65
S
17
G
8
Posts: 636
Reputation: 9,333

Post » Tue Oct 21, 2014 4:49 pm

OK so first
Thank You for the quickly answers
I tryed to did anything that @Jase00 but i didn't succed
if someoane could help me with this :D
You do not have the required permissions to view the files attached to this post.
B
11
S
3
Posts: 277
Reputation: 1,395

Post » Tue Oct 21, 2014 5:14 pm

Radule... :)
You do not have the required permissions to view the files attached to this post.
Image
B
64
S
23
G
7
Posts: 1,482
Reputation: 10,825

Post » Tue Oct 21, 2014 5:20 pm

THANK YOU ! , You are THE BEST!!!!!!!!! :D
B
11
S
3
Posts: 277
Reputation: 1,395

Post » Tue Oct 21, 2014 6:58 pm

Message: Radulepy can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
https://www.scirra.com/ forum/viewtopic.php?f=182&t=116600
Can anyoane help me with this too?
B
11
S
3
Posts: 277
Reputation: 1,395

Post » Tue Oct 21, 2014 7:58 pm

Link don't working..
Send me a private message..
Image
B
64
S
23
G
7
Posts: 1,482
Reputation: 10,825

Post » Wed Oct 22, 2014 12:51 pm

Message: Radulepy can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
i can't let me try again
It is a space somewhere
https://www.scirra .com/forum/viewtopic.php?f=182&t=116600
B
11
S
3
Posts: 277
Reputation: 1,395

Post » Mon Oct 27, 2014 8:14 pm

@korbaach can you help me please ?
B
11
S
3
Posts: 277
Reputation: 1,395

Next

Return to How do I....?

Who is online

Users browsing this forum: mikehive, plinkie, Yahoo [Bot] and 10 guests