So far this forum has been a great help with scripting when it comes to the creation kit but I still need help.
I am looking to add 2 scripts.
1. I want a function to be executed when my character recieves a hit from a weapon, arrow OR spell.
Example:
Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
The problem is I dont know how to use this function, if its with an item, the player character or a quest so examples from others are required.
2. I also want a function to execute ONLY when my character hits any target with a melee weapon (not sure how easily this can be done and have no idea how to go about it).
Thanks.

