Touch.enemy.skill

Get help using Construct 2

Post » Thu Aug 15, 2013 1:44 pm

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!
B
9
S
2
Posts: 82
Reputation: 914

Post » Thu Aug 15, 2013 3:05 pm

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.
B
8
S
1
Posts: 31
Reputation: 598

Post » Thu Aug 15, 2013 3:54 pm

@amishstripclub
Thanks!
B
9
S
2
Posts: 82
Reputation: 914

Post » Sun Aug 18, 2013 2:54 am

@amishstripclub

When you click the enemy, how to change animation of the enemy every time
you touched the enemy?
helpppp :)

THANKS!:)
B
9
S
2
Posts: 82
Reputation: 914

Post » Tue Aug 20, 2013 2:13 pm

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.
B
8
S
1
Posts: 31
Reputation: 598


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 19 guests