This effect is a conversion of my Construct 2 effect of the same name.
You can test a live example on Scirra Arcade.