Touch.enemy.skill

0 favourites
  • 5 posts
From the Asset Store
Set of 200 hand drawn skill icons. All icons are of a high quality.
  • Hi guys!

    I am trying to develop a Tower defense game for touch devices.

    So...In my game

    when enemy spawn when you touch the enemy there an lightning or skills that it will decrease his health..

    help O:)

    THANKS!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ok so you need to create an enemy sprite and give it an instance variable to represent its health. Then create a on touch, spawn lightning sprite at touch.x, touch.y. Give the lightning an animation, and have an event that destroys it at animation end. Add another event -> if lightning overlaps enemy, subtract x amount from enemy.health. You'll want that event to have a condition that triggers once while true. Last, you'll need a 'death' event. So, compare enemy instance variable health <= 0, destroy enemy. Add an event to spawn the enemies, and another to handle their motion and you should have a playable alpha.

  • amishstripclub

    Thanks!

  • amishstripclub

    When you click the enemy, how to change animation of the enemy every time

    you touched the enemy?

    helpppp :)

    THANKS!:)

  • As in to show that it is taking damage? Add a subevent to your lightning overlap enemy event. In the subevent, Enemy Set Amimation to "Damage". Then, add one more event that is Enemy On "Damage" Animation End, Set Enemy Animation to "Default". Of course, fill in Damage or Default for whatever your animation names are.

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