Player fire bullet while running?

Get help using Construct 2

Post » Thu Aug 09, 2012 7:14 pm

how can i make a player fire bullet at the same time he is running?

note: i have added animation to player, so want him to fire bullet while running?
B
3
Posts: 13
Reputation: 476

Post » Thu Aug 09, 2012 8:30 pm

[URL=https://lh6.googleusercontent.com/-L-muyG9SbDE/UCP9biiAfbI/AAAAAAAAAEw/M9Dk4gZjb_o/s800/snap.gif ][/URL]

snapshot
B
3
Posts: 13
Reputation: 476

Post » Fri Aug 10, 2012 2:50 am

Should be pretty simple. Just have a point at the end of the gun, and an event that states that when a button is pressed, that spawns a bullet behaved object in the direction the player is facing.
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
68
S
8
G
6
Posts: 929
Reputation: 9,356

Post » Fri Aug 10, 2012 11:42 am

thanks and4d for your reply..
but u didnt understands see when i press right player mover right with animation of running same for left, and also i have assigned animation to space button he use to fire bullet but when i press space button along with right it does not walk(run).

how could i do that?
B
3
Posts: 13
Reputation: 476

Post » Fri Aug 10, 2012 12:03 pm

It'll be easier to fix and explain if you upload the capx.. but don't you need another animation for running and shooting at the same time?


B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Fri Aug 10, 2012 1:19 pm

http://www.4shared.com/file/-nyeflEy/metalslug_test_.html

here is the link and i have the animation for run and shoot
how i will link it in events
B
3
Posts: 13
Reputation: 476

Post » Fri Aug 10, 2012 2:49 pm

So you want an animation of him running?
You'd be better off having the gun as a separate sprite in that case, with its own animations, and just attach it to the player's hand. If you want the run/fire animation to override the running, you need to add an inverted condition that checks whether the fire button is pressed, and then expand on that.
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
68
S
8
G
6
Posts: 929
Reputation: 9,356


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, mnashwan, shinkan, stylie1, tarek2 and 11 guests