Page 2 of 2

Re: Character controlled by WASD pointing towards mous

PostPosted: Wed Feb 27, 2013 12:07 pm
by condolent
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

Re: Character controlled by WASD pointing towards mous

PostPosted: Wed Feb 27, 2013 1:38 pm
by Pakost
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

Re: Character controlled by WASD pointing towards mous

PostPosted: Wed Feb 27, 2013 2:08 pm
by condolent
Yes it is!
Thank very much!

Re: Character controlled by WASD pointing towards mous

PostPosted: Wed Feb 27, 2013 3:42 pm
by ramones
Here's a more compact way of doing the animations (what @Pakost was getting at before):
8dirAnimAndShoot.capx (r119)

Re: Character controlled by WASD pointing towards mous

PostPosted: Wed Feb 27, 2013 3:52 pm
by Pakost
Nice
I always knew i lack some math knowledge :)

Re: Character controlled by WASD pointing towards mous

PostPosted: Thu Feb 28, 2013 12:00 pm
by Tedg
Thanks is very useful.