Custom event Help(hp <=x)

How do i call something to happen when player hp goes below x%?i guess event or function?and if yes which and how?thanks for your time