by d-soldier » Sat Apr 21, 2007 7:13 pm
... doesnt seem to work... the laser(actor) is creates the sound upon it's creation, so I put the code-
------
if(distance(x, 0, player.x, 0) > 100)sound = 0;
else
{
sound = 1;
}
-----
in it's creation script (even tried draw actor script too) and removed the original create actor/play sound function and replaced with create actor/script -
-----
PlaySound2("data/your_sound.wav", sound, 1, 0.000000);
-----
And now I hear nothing... adjusted the x distance in the script, and even moved my "not drawn at startup" laser actor close to the action (just to be sure)... nothing... Any ideas? (and I did adjust the "player" actor name in the code to fit my game, btw)