"p" and "my" are two different things. "p" is a particle and "my" is an entity pointer. So your code won't make sense and will probably crash. Both particles and entities have similar parameters, but setting entity parameters in a particle function is probably not what you intended.