Shooting Enemy

Get help using Construct 2

Post » Sat Jul 18, 2015 12:06 pm

I've looked everywhere for this but nothing gives me a straight answer.

How do I make an enemy shoot at me?

This enemy doesn't move and it doesn't look around. It shoots in a straight line to the left. The thing it shoots will usually hit a wall, I want it to be destroyed upon hitting the wall.

It has a shooting animation, a reload animation and an idle animation.

How do I do it? Please explain it to me in an easy to understand way ^-^
B
24
S
10
G
1
Posts: 153
Reputation: 2,660

Post » Sat Jul 18, 2015 12:54 pm

Something like:

Every x seconds
> enemy spawn bullet
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 Jul 18, 2015 1:16 pm

That doesn't really help me at all (^-^;)
B
24
S
10
G
1
Posts: 153
Reputation: 2,660

Post » Sat Jul 18, 2015 1:20 pm

ChaoticShadow24 wrote:That doesn't really help me at all (^-^;)


Well if you could explain better what you want, it would be easier to answer your question..

It sounds like you want your enemy to shoot at time intervals, so that's what I explained..
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 Jul 18, 2015 1:33 pm

"How do I make an enemy shoot"

Then i proceeded to tell you how the enemy works. Does not look around, does not move at all.

I want to make it shoot in a straight line either left or right.

If it's bullet hits a wall, then the bullet with disappear.

It has a shooting animation, an idle animation, and a reload animation.

I think I explained it pretty well.

One thing I failed to mention however is that I would like it to shoot ever 2 seconds or so.

To put it simply, I need a way to make the enemy shoot after the "Shoot" animation, to "reload" after it's shot, and to idle in between shots. I also need to figure out how to make the bullets appear every 2 or so seconds over and over again.
B
24
S
10
G
1
Posts: 153
Reputation: 2,660

Post » Sat Jul 18, 2015 1:38 pm

System every 2 seconds
- enemy play shooting animation
- enemy spawn bullet..

bullet on collision with wall
- bullet destroy

enemy on shooting animation finished
> enemy play animation idle

to shoot in a straight line either set the bullets angle of motion to 0 (right) or 180 (left) degrees

now the only question left is how often the enemy has to reload..
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 » Sun Jul 19, 2015 2:22 am

How do I get the enemy to spawn a bullet? What behaviors do I need to add to the enemy? What are the properties I need to give to the bullet sprite? What behaviors do I give the bullet? How do I make the bullet go the way I want it to?
Help me out a little : P
B
24
S
10
G
1
Posts: 153
Reputation: 2,660

Post » Sun Jul 19, 2015 2:45 am

ChaoticShadow24 wrote:How do I get the enemy to spawn a bullet?

see LittleStain's last answer
ChaoticShadow24 wrote:What behaviors do I need to add to the enemy?

None for this action... You just need animations
ChaoticShadow24 wrote:What are the properties I need to give to the bullet sprite?

As LittleStain writes, set the angle of motion... and the speed
ChaoticShadow24 wrote:What behaviors do I give the bullet?

Seriously..... https://www.scirra.com/manual/90/bullet
ChaoticShadow24 wrote:How do I make the bullet go the way I want it to?

As LittleStain writes, set the angle of motion
ChaoticShadow24 wrote:Help me out a little : P

it might help https://www.scirra.com/manual/1/construct-2 ;)
Image Image
B
22
S
13
G
129
Posts: 868
Reputation: 67,314

Post » Sun Jul 19, 2015 2:49 am

Sorry for being a beginner I guess. I'll try that stuff out.
B
24
S
10
G
1
Posts: 153
Reputation: 2,660

Post » Sun Jul 19, 2015 2:56 am

No problem ... I'm just trying to clarify. ^^
You should try to do something with these early indications and I advise you to train yourself with the tutorials . They help to start and to learn the basics of C2.
Enjoy
Image Image
B
22
S
13
G
129
Posts: 868
Reputation: 67,314

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 4 guests