hello,
am giving plbiped action (from A6 template) for the player,
and i want this spray action to be included in the player action.
I am trying to make the player spray when some key is clicked and also walk using WSAD keys(i.e., using plbiped action).



/*spray*/

BMAP px_tga = "smog_02.tga";



function fade_p()

{

my.alpha -= 10 * time_step;

if (my.alpha < 0) {my.lifespan = 0;}

}



function effect_x()

{

my.alpha = 30 + random(65);

my.flare = on;

my.bmap = px_tga;

my.size = 12;

my.bright = on;

my.move = on;

my.function = fade_p;

}



function create_px()

{

var temp_pos;

var temp_var;

while (1)

{
// player = me;
// vec_set (temp_pos.x, my.x);

temp_pos.x += 20 * cos(temp_var); // 20 = particle radius

temp_pos.y += 20 * sin(temp_var); // use the same value here

effect(effect_x, 1, temp_pos.x, nullvector);

wait (1);

}

}




on_m = create_px;