I found the solution. Not accurate but so so.

Code:
function BeamAnimate()
{
	vec_set(BallLastPos, BallCurrentPos);
	vec_set(BallCurrentPos, Ball.x);
	
	VECTOR BallHeading;
	vec_diff(BallHeading,BallCurrentPos,BallLastPos);
	vec_scale(BallHeading,0.1);

	var temp0;
	for (temp0=0; temp0<10; temp0++)
	{
		vec_add(BallLastPos,BallHeading);
		effect(ParticleEffectBeam,1,BallLastPos,nullvector);
	}
}

function BallMove()
{
	while (1)
	{
		c_move(Ball, vector(100*time_step,0,0), nullvector, GLIDE);
		BeamAnimate();
		wait(1);
	}
}