hi guys,
I am using this code to for putting commentary for different items in a room:
sound SkelVoiceSND = <welcome.wav>; // The sound...
var SkelVoiceVol = 100; // The volume...
ACTION SkelVoice
{
my.skill1 = 1; // Distance from player...
while(my.skill1 > 0)
{
if (vec_dist(my.x, camera.x) <= my.skill1)
{
ent_playsound(my, SkelVoiceSND, SkelVoiceVol);
my.skill1 = 0;
}
wait(1);
}
}
(just got from the same forum) but the problem is that commentary just starts running with the start of the game. Is there anybody who can help in the regard?? I am entirely new to C script so please explain how I will change the code that camera or player will reach near the item and than can hear the sound only onceā¦.please help
thanks
aslam