shooting enemy

Get help using Construct 2

Post » Mon Aug 13, 2012 11:49 am



My question is how can i apply animation sprite to an enemy when bullet

collides with him???
B
3
Posts: 13
Reputation: 476

Post » Mon Aug 13, 2012 12:05 pm

New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Mon Aug 13, 2012 12:44 pm


thanks kayatic
but i have a problem
see snapshot

https://lh5.googleusercontent.com/-8TUJkPNdL24/UCjoHHocarI/AAAAAAAAAFE/iY6EqmyrCaM/s576/snap.gif

see i have set the soldier to follow the hero..so i need when hero shoots
dead animation will be played and soldier will be destroyed
how to do that?
B
3
Posts: 13
Reputation: 476

Post » Mon Aug 13, 2012 12:53 pm

Add an event "Soldier: on (animation) finished" animation name: "dead".
In this event, put a "Soldier: destroy" action.

Also make sure that the "dead" animation does not loop.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Mon Aug 13, 2012 2:16 pm

kyatric
its working only when i disable
soldier/X>hero.X
soldier/X<hero.X

if i turn these follow option its not working..
what the hell is wrong!!!!
B
3
Posts: 13
Reputation: 476

Post » Mon Aug 13, 2012 2:50 pm

Oh right, you need to add a condition in those events.
For each "Soldier.X" comparison add a "Soldier: Animation is playing" "dead" and right click this condition and "invert" it.

This condition will make sure the check for the Soldier.x won't be done when the soldier is "dying".

This is because of how events work, your soldier is having different "states", you need your logic to take it into account.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Mon Aug 13, 2012 3:28 pm

oh maan it worked!!!
thanks you had made my day..
thankyou so much


can you plzz explain me why it was happing so i can understand it brefly!kaushik0002012-08-13 15:29:15
B
3
Posts: 13
Reputation: 476


Return to How do I....?

Who is online

Users browsing this forum: LeFuji, Yahoo [Bot] and 24 guests