How do I get this Sprite to shoot left?

Get help using Construct 2

Post » Wed Dec 10, 2014 10:21 am

Couldn't you just check if the player is mirrored, then: Bullet->set angle of motion -> -180

If that flips your bullet sprite upside-down, you can disable that in the bullet behavior properties (there's an option that sets the bullet sprite angle to the angle of motion). Next add:

Bullet->set mirrored->mirrored

To the above part (within the check player is mirrored part)
B
18
S
6
G
3
Posts: 30
Reputation: 4,198

Post » Wed Dec 10, 2014 10:30 am

Not sure if this will help, but he's my Event Sheet. Because I'm sloppy I went ahead and highlighted the relevant bits.

Image
B
5
Posts: 17
Reputation: 259

Post » Wed Dec 10, 2014 10:56 am

Try this demo shoots both ways
You do not have the required permissions to view the files attached to this post.
B
251
S
39
G
15
Posts: 1,964
Reputation: 40,723

Post » Wed Dec 10, 2014 11:08 am

Uh... how do I update Construct 2 to 191? I can't find a 'Check for Update' button ANYWHERE.
B
5
Posts: 17
Reputation: 259


Post » Wed Dec 10, 2014 11:45 am

Thanks.


Your bullet example is significantly more elegant. Thanks.

Also works if you use 'Spawn Another Object' with an Image Point, rather than 'Create Object' from the sprite origin.
B
5
Posts: 17
Reputation: 259

Post » Wed Dec 10, 2014 1:09 pm

Hello I really need help on how to throw the pig to the left

please look at the youtube link from the attached document so you can see what I mean

attachemt :-
my throw event

Thanks in advance
regards
You do not have the required permissions to view the files attached to this post.
B
7
S
1
Posts: 14
Reputation: 531

Post » Wed Dec 10, 2014 1:47 pm

@borneoboy
very simple solution for shooting both sides is to create a player variable called "Facing"

Always (Every tick) set the value of Facing to 1 if your player is facing RIGHT
and set to -1 if facing LEFT

Shoot a bullet
then Bullet: Set Bullet Speed to 300*Bullet.Facing

it should shoot left when player is facing left, shoot right when player is facing right
B
16
S
7
Posts: 301
Reputation: 2,726

Post » Wed Dec 10, 2014 2:07 pm

sgn15 try this demo
You do not have the required permissions to view the files attached to this post.
B
251
S
39
G
15
Posts: 1,964
Reputation: 40,723

Post » Wed Dec 10, 2014 2:11 pm

borneoboy I am sorry I do not have time to go on youtube.com. If you need help you need to post capx
B
251
S
39
G
15
Posts: 1,964
Reputation: 40,723

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: bclikesyou, kalibark2 and 32 guests