Custom Stencil Buffer. How to use it.

I am trying to follow this guide:
https://www.reddit.com/r/unrealengine/comments/4gzcdd/custom_depth_pass_how/d2s2jx3/

But no matter what I do it does not work as they have done it.
I have followed every step to a T, and tried multiple variations, nothing seems to work.

Has anyone got any advice, tips, guides or any information at all, there is no documentation on it, and every link on google I have followed about using it does not work. I am at my wits end