Enemy Controlling

Get help using Construct 2

Post » Sat Jan 04, 2014 1:00 pm

Turkish
Merhaba, Ingilizce bilmiyorum fakat Trke bilen birisinin olmamasina karsin bu metnin Google Translate ile tercme edilmis halini de asagida bulunduracagim.

Ilk nce sorunu anlatayim. Bir karakter olusturdum, dsmanlarina ates ederek onlari yok ediyor. Dsmanlar ise, karakter 200 pixel yakinina geldiginde karaktere dnp, ates edip yok edebiliyor. Simdi asil sorun burada basliyor. nk karakter bir dsmanin yanina yaklastiginda dsman ona ates ediyor ancak diger dsmanlar da baslangita hangi yne bakiyorlarsa o tarafa dogru ates ediyor. Ben sadece yakin oldugum bir dsmanin karaktere ates etmesini istiyorum.
200 pixel yakinina geldiginde ates etmesi iin bu komutu kullandim.

Resim yok

Dsman karakterin x ve y koordinatina dnerek ona 2 saniyede 1 kere ates ediyor. Ancak oyunda var olan btn dsmanlar ates ediyor. Olmasini istedigim sadece 200 pixel yakininda oldugum dsman karaktere ates etsin.
Bunu nasil yapabilirim? Yardiminiz gerekiyor.
Tesekkrler

English
Hi, I do not know English , but Turkish , although there is someone who knows this text was translated by Google Translate version 'll keep it below .

Let me first explain the problem . I created a character , destroy them by shooting enemies . Enemies , however, when the characters come close to 200 pixel characters go , can shoot and destroy . Now the real problem starts here . When an enemy approached him because the characters are enemies to shoot him but the other enemies initially looking in what direction they are shooting toward that side . I 'm just recently I want to shoot an enemy character .
When it comes to close to 200 pixel 've used this command to fire .

not image

Turning to the enemy character's x and y coordinates firing him 1 time in 2 seconds . However, all the enemies in the game there 's shooting . I just wanted to be near 200 pixel enemy characters I get fired .
How can I do this ? I need your help .
thanks
B
3
Posts: 7
Reputation: 191

Post » Sat Jan 04, 2014 2:04 pm

This is a picking problem.

add a for each enemy

for each enemy
system compare two values : distance(enemy.x,enemy.y,player.x,player.y)<200
- enemy shoot
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 Jan 04, 2014 4:22 pm

Thank you so much Was exactly what I want. But now I just add sprite as the enemy is attacking. Creating new enemies with certain time intervals (every 3 seconds). I've added the sprite as you destroyed the enemy does not attack the newly created enemies. How do I handle this?
B
3
Posts: 7
Reputation: 191

Post » Sun Jan 05, 2014 1:10 pm

actual
B
3
Posts: 7
Reputation: 191

Post » Sun Jan 05, 2014 1:26 pm

I'm sorry but I don't understand this question.

You say you are adding a sprite when the enemy is attacking, do you mean that you added an attack-animation to your enemy-sprite?

You are creating new enemies every 3 seconds, this I understand.

You also added a sprite for when the enemy is destroyed. Is this a new sprite you spawn, or is this an animation of the enemy sprite?

I don't understand the part of the newly created enemies, I'm sorry.

I think you might mean that the destroyed sprite is happening to all your enemies, but that shouldn't happen if you pick the right sprite. Could you share your events if this is the case?



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 Jan 05, 2014 3:29 pm

Imagine a huge map available space game . To be the enemy spaceship sprites as one ekledim.events at certain time intervals for the formation of new enemies "every x second" I use the following code . In this way, for example, 20 seconds to 1 enemy created . I add my sprite as the enemy ship , the character is able to fire back when I approached 200 pixel can damage . But "every x second" I created the characters do not damage the enemy ships . I've noticed that I added as sprites on the worksheet without destroying the enemy ships enemy saldirmiyor.l no other links in the forum , unfortunately I can not share warns . But he 'll tell me.
Imagine a huge map available space game . To be the enemy spaceship sprites as one ekledim.events at certain time intervals for the formation of new enemies "every x second" I use the following code . In this way, for example, 20 seconds to 1 enemy created . I add my sprite as the enemy ship , the character is able to fire back when I approached 200 pixel can damage . But "every x second" I created the characters do not damage the enemy ships . I've noticed that I added as sprites on the worksheet without destroying the enemy ships can not attack an enemy no other .


Link to the forum warns unfortunately I can not share .
B
3
Posts: 7
Reputation: 191

Post » Sun Jan 05, 2014 3:29 pm

Examples: testsunucu. url.ph/SpaceTurk/
B
3
Posts: 7
Reputation: 191

Post » Sun Jan 05, 2014 3:45 pm

I'm sorry, but I don't understand what you are trying to say and I can't get to the page you linked to.

I hope someone here can understand what you mean and will be able to help you..
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 Jan 05, 2014 4:55 pm

I understand, thank you for your help.

First created without destroying the enemy ship does not attack other enemies. Example in terms of being located below the space by deleting link your page can enter.
testsunucu. url.ph/SpaceTurk/
B
3
Posts: 7
Reputation: 191

Post » Tue Jun 24, 2014 7:36 pm

This is an unintelligible translation...wish I could understand the issue.
B
13
S
5
G
1
Posts: 119
Reputation: 2,292

Next

Return to How do I....?

Who is online

Users browsing this forum: ChoosyZerk, jorgmaquoi and 62 guests