Decal animation effects with character

Hey there,

For my video game I need some help with decal animation effects. Is there a way we can attach a script to a character and when this character collides with a wall/object the material changes? and or revels a decal that can offer the same effect?

pretty much im trying to replicate this feature in this youtube short film CGI Animated Short Film HD "Bogeyman" by Flipbook Studio | CGMeetup - YouTube

watch :55 to 1:00 in for the effect. also 1:20 to 1:26 .

can someone please help me out ? and tell me how to do this ?

thanks!