How do I deal with different type of enemies?

Get help using Construct 2

Post » Mon Mar 27, 2017 9:47 pm

Hi there!

First time post, so be gentle ;-)
My question is how would the process be to handle different types of enemies?
I want to have lets say two types of enemy be on the Screen at the same time, each enemy has ist own stats.
Each enemy should show ist own heathvalue in a testfield.
Then I would have three Buttons. One deals damage to the strongest enemy, one to the weakes and one to all enemies.

How does that work? How to diffeneeciate between them?
Since i want to have multiple Levels, i dont want to "hard-code" that for every Level by Hand, how can i make a System for this?

Any hints on that Topic would be very helpful!

Thanks!
B
3
Posts: 1
Reputation: 317

Post » Mon Mar 27, 2017 9:58 pm

Assign instance variables (health,mana, speed, strength...) to both enemies and use value comparison when pressing the damage-dealing buttons to detect which enemy to attack. (depending on your definition of 'stronger' or 'weaker' )

As of now there's really no good useful single piece of advice since I don't know how long you've been using C2, what skills or feats you want to learn. So just look through the Frequently Asked Questions Page and see which ones you can apply to your project...
Image Image Image
B
31
S
11
G
27
Posts: 748
Reputation: 17,093


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 18 guests