Enemy platform behavior - patroling & shooting

Get help using Construct 2

Post » Sat Oct 31, 2015 4:32 pm

Hello,
I have been looking around for answers to my problem and found clues, but nothing conclusive, so here it goes:
My game is a platform game where you play an undertaker who has to bury the enemies as they shoot each other. So I want my enemy to patrol and shoot!
Problem is, I managed to make them patrol back and forth using a text variable:
Image
But when I try to make them shoot, using an invisible sprite (detection, on my sheet) as a trigger, I think the variable that make them move isn't letting the whole shooting animation play. I only see the first frame.
How can I tell the game that the cowboy has to stop walking and shoot instead?
Many thanks in advance to whoever will take time for me!
B
4
Posts: 5
Reputation: 210

Post » Sat Oct 31, 2015 4:36 pm

you could try with something as simple as adding a condition to event 19 and 20

CoBoI2 animation CBfire is not playing..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Oct 31, 2015 4:46 pm

Yes, that is very simple and a good idea. It's gonna sound pretty dumb but i only have the "is playing" condition. how do I say not playing?
B
4
Posts: 5
Reputation: 210

Post » Sat Oct 31, 2015 4:51 pm

Oburie wrote:Yes, that is very simple and a good idea. It's gonna sound pretty dumb but i only have the "is playing" condition. how do I say not playing?


right click the "is playing" and choose invert..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Oct 31, 2015 4:57 pm

YES! Thanks that works. Now I have to make them walk again afterwards. If you have an idea go ahead I'm searching as i write.
B
4
Posts: 5
Reputation: 210

Post » Sat Oct 31, 2015 5:11 pm

Okay, I added to the overlaping detection condition a system wait of the time of the fire animation and played the idle animation so the condition for the character to move again be met.
Tanks a lot for putting me on the right tracks. I'm going to do the bullet spawning now. (I don't know anything about it though :D)
B
4
Posts: 5
Reputation: 210


Return to How do I....?

Who is online

Users browsing this forum: blackhornet and 1 guest