Damage trigger?

I am trying to make the ai have an invisably box infront of them and when i am in side the tigger box i will loose 10 hp a second? i cant find any tutorials or scripts to do this EXACTLY i cant come up with scripts on my own i have been tring to modify ones i find on the internet and other together but no matter how i put it it desnt work can someone post a script that would be VERY Simple to modify or needs no modifications at all?

function OnCollisionEnter(collision : Collision) {
    if(collision.gameObject.tag == Player){
        collision.gameObject.//Whatever you want to edit on the player...  Get their component and change what you need, anything...
    }

}

This'll work if you make the AI have a larger collider, then this'll run, and you can edit whatever is needed...

Read this page for what kind of things you can do: http://unity3d.com/support/documentation/ScriptReference/GameObject.html