Character controlled by WASD pointing towards mous

Get help using Construct 2

Post » Wed Feb 27, 2013 12:07 pm

Now my next question (don't know if it's possible at the moment):
I tried to make him fire bullets when holding down left mouse button. Bullets are spawning correctly (1 per 0.35 sec).
But when I tried to make them go at different directions for when he's facing another way, they just change everytime my mouse moves and character switches animation.
I added "angle of motion" on every direction event, this is how the event sheet looks like:


Download a .capx here if you're OP:
https://www.dropbox.com/sh/c08d30hn4j6azci/i0AgKCgZYy
Website Twitter Indie Developer
B
20
S
5
G
4
Posts: 201
Reputation: 2,884

Post » Wed Feb 27, 2013 1:38 pm

You can try to make a condition "On object created" for the bullets
That way the bullets direction will be set once when the bullet is created
Hope that is what u ment
Cheers
B
12
S
3
G
1
Posts: 120
Reputation: 1,829

Post » Wed Feb 27, 2013 2:08 pm

Yes it is!
Thank very much!
Website Twitter Indie Developer
B
20
S
5
G
4
Posts: 201
Reputation: 2,884

Post » Wed Feb 27, 2013 3:42 pm

Here's a more compact way of doing the animations (what @Pakost was getting at before):
8dirAnimAndShoot.capx (r119)
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Wed Feb 27, 2013 3:52 pm

Nice
I always knew i lack some math knowledge :)
B
12
S
3
G
1
Posts: 120
Reputation: 1,829

Post » Thu Feb 28, 2013 12:00 pm

Thanks is very useful.
B
70
S
11
G
6
Posts: 18
Reputation: 9,152

Previous

Return to How do I....?

Who is online

Users browsing this forum: Callan S, getplay, Kagubro and 24 guests