is this possible

hi i am making a hack slash game
and i could not find a way to do damage to the enemy’s

i have a sword with a trigger that i animated.
This is howe it works

swords goes down>colides with other object>object is destroyed.

this is howe i want it to work:
sword goes down> colides with other object> object recieves some sort of message to take X amount of dammage> healt goes down with X.

can some one help me with it?
i am not a scripter att all. So it would be realy nice if some one. could write a example of that script. Or tell me where i have to search at. unity3d.com.

thnx for your time and i hope some one can help me

thnx i already got a script wich has a targeting system and all but the thing where i am looking for is.

when i swing my sword the collider(trigger) hits a object.
is there any way that it can send a message to the object wich it collided with. that when it collides the objects has to take dammage.

and than preferly that i can change the dammage ratio for each weapon.

this also means that when i swing my weapon. and there are more than 1 objects in the way of my weapon. all the objects take dammage

this is what i got now(i don’t know exactly what it means but i know what it does :smile: )

// Destroy everything that enters the trigger
function OnTriggerEnter (other : Collider) {
    Destroy(other.gameObject);
}

realy thanks for replying

thank you very very much for your time and effords

but i got 1 problem :sweat_smile:

i get this error:
Assets/scripts/attack.js(4,17): BCE0018: The name ‘Enemy’ does not denote a valid type. Did you mean ‘System.Enum’ ?

it does not matter wich scipt combo i use i think i did some thing wrong with the Enemy(i tagged it Enemy and i named it Enemy)

and again thank you very very much

YAAAYY!!!

thank you very much
this is exactly what i needed!!!
thank you so much