Enemy Controlling

  • Turkish

    Merhaba, Ingilizce bilmiyorum fakat T?rk?e bilen birisinin olmamasina karsin bu metnin Google Translate ile terc?me edilmis halini de asagida bulunduracagim.

    Ilk ?nce sorunu anlatayim. Bir karakter olusturdum, d?smanlarina ates ederek onlari yok ediyor. D?smanlar ise, karakter 200 pixel yakinina geldiginde karaktere d?n?p, ates edip yok edebiliyor. Simdi asil sorun burada basliyor. ??nk? karakter bir d?smanin yanina yaklastiginda d?sman ona ates ediyor ancak diger d?smanlar da baslangi?ta hangi y?ne bakiyorlarsa o tarafa dogru ates ediyor. Ben sadece yakin oldugum bir d?smanin karaktere ates etmesini istiyorum.

    200 pixel yakinina geldiginde ates etmesi i?in bu komutu kullandim.

    Resim yok

    D?sman karakterin x ve y koordinatina d?nerek ona 2 saniyede 1 kere ates ediyor. Ancak oyunda var olan b?t?n d?smanlar ates ediyor. Olmasini istedigim sadece 200 pixel yakininda oldugum d?sman karaktere ates etsin.

    Bunu nasil yapabilirim? Yardiminiz gerekiyor.

    Tesekk?rler

    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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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
  • 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?

  • actual

  • 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?

  • 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 .

  • Examples: testsunucu. url.ph/SpaceTurk/

  • 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 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/

  • This is an unintelligible translation...wish I could understand the issue.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)