I didn't target that enemy!

0 favourites
  • 6 posts
From the Asset Store
Give Sound to the enemies that are part of your game! :)
  • Hello.

    I made instances of sprites called "SpawnSpell" and once I target an "Enemy" the SpawnSpell sprite is selected at a random instance and spawns a spell and targets an enemy to destroy it.

    The problem is, sometimes when I click on an enemy to destroy it, the spell sprite tends to target another enemy, and not the one I intended t destroy. How can this issue be solved?

    Here is my project file:

    dropbox.com/s/qfi9otk8mxv87es/Allah.capx

    Thanks for the help!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No one know?

  • Seems like I wasted $120 USD for license and I can never get any help here.

  • I can't view your capx as I'm running 108, but some context would be appreciated; like the genre of game for background knowledge.

    Is the spell a bullet? Is the same enemy destroyed each time?

    A prtscrn of the event sheet would be helpful (Y)

  • Event 9 you set 'red' towards 'enemy'. Which enemy though? You haven't specified so they'll all just move towards the first in the list. You need associate each 'red' with a specific enemy.

    Give 'red' a number instance variable called 'targetUID'.

    When you spawn the 'red', set it's 'targetUID' to 'enemy.UID'

    and then in event 9 instead of every tick have

    system: for each red

    enemy: pick by UID red.targetUID

    ---> red: set angle toward (enemy.x, enemy.y)

  • I cant get that to work ^ What I need to do is probably declare a variable and for each enemy spawned, give it a number and when clicked on enemy it goes to that number.

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