Ch40zzC0d3e is right.
you way of randomizing the particle's velocity is the problem.

It has to be applied before rotating the velocity vector:
Code:
function particle()
{
	VECTOR particle_velocity;
 	
 	var speed = 5; // particle speed - this needs to be adjusted!
 	var r_a = 75; // random angle

	cikarma = 1;	
	while(key_space)
	{
		if(cikarma==1)
		{
			vec_set(particle_velocity, vector(-random(speed), 0, 0); // randomize velocity
			vec_rotate(particle_velocity, vector(player.pan + random(r_a / 2) - r_a, player.tilt + random(r_a / 2) - r_a, 0); // randomize angle
			
			effect(gas_function, 20, player.x, particle_velocity);
			media_play("fart.wav", NULL, 100);
		}
		wait(1);
	}	
}


this should work if you remove the random velocity from your particle function

Last edited by Kartoffel; 11/10/12 14:10.

POTATO-MAN saves the day! - Random