Ok, then the problem seems clear - you were just confusing ent_mtlset with the material parameter. Again: ent_mtlset does NOT set an entity material. But when your effect requires a material, you must set it.

my.material = dm_brick01;

That's how to set a material.