Thanks a lot for this contribution! Its exactly what i needed. To play a hit sound on level geometry i used a sprite for the hit flash so i could do it with ent_playsound. With your code i can do the effect with a particle wich is faster.