filth 0 Posted January 22, 2007 ... or location? then loop it so that it plays constantly, just at that location? i'll explain. i'm making a mission where an oil fire has to be extinguished. at the base of the oil well, i want the sound of the fire to be more than just your usual pretty little crackles. (i've buried a fire and set it to inflame true) i want the sound to be more of a roar. i've recorded a custom roaring fire sound, but i don't know how to set the sound locally at the base of the oil well, so that you can only hear it when you're up close. also, the sound is only a couple of seconds long, and i need it to loop itself so that it appears to play continuously until a player fires a trigger to stop it. help gladly appreciated. thx. filth. Share this post Link to post Share on other sites
The-Architect 0 Posted January 22, 2007 You have to make the object say the sound. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#Loop OilObject say "firenoise" ~2 Goto "Loop" Share this post Link to post Share on other sites
filth 0 Posted January 22, 2007 works a treat. thanks a million. - one other thing though: how do i stop the object 'saying' the sound when a trigger is fired? thx, filth. Share this post Link to post Share on other sites
The-Architect 0 Posted January 22, 2007 I thought you'd ask that. You need a condition which is checked at the beginning of the loop. You can have anything as your condition. We'll use. "IJustFartedandIThinkIFollowedThrough" Edit your script to look like this, <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#Loop ? IJustFartedandIThinkIFollowedThrough : goto "End" OilObject say "firenoise" ~2 Goto "Loop" #End Exit In your trigger you make that condition true. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">IJustFartedandIThinkIFollowedThrough = true Just like that. Share this post Link to post Share on other sites
filth 0 Posted January 22, 2007 brilliant. thank you. one final thing... the condition i set as true when the oilfire (fire1) is put out - is 'well1'. therefore to stop the oil well 'saying' the roar of the fire, i did as you said and put this as the condition to check for at the start of the script. the script reads: #Loop ? well1 : goto "End" oilwell1 say "oilfire1" ~2 Goto "Loop" and it works perfectly, thanks for that. now, this trigger effectively acts as an 'objective complete' trigger (the fire being out) as well as stopping the custom sound of the fire. nice and efficient. now... and this is where my brain fries itself: i also have another trigger which is set with the conditions: well1 && inflamed fire1 well1 because i don't want this trigger firing before someone has extinguished the fire at least once and inflamed fire1 to check to see if the fire has been reignited. on activation - (when some mischievous person decides that they're going to relight the oil fire), the fire lights up again obviously, and the objective turns back to active. in other words, the player's task is to guard the fire from being reignited. what i need to happen is for the sound of the roar to start up again should the fire be relit. and my brain is too small to be able to work out how to do it. i hope this makes sense. thanks for your time and patience. filth. Share this post Link to post Share on other sites
SevenBEF 0 Posted January 23, 2007 best would be to have a seperate trigger that only checks if the fire is burning; set it to repeate; in it's condition field inflamed fire1 AND !(fireburning) on activation: [] exec "mysoundscript.sqs" modify ur script: fireburning = true; PublicVariable "fireburning"; #Loop ? well1 : goto "End" ?(!inflamed fire1):goto "End" oilwell1 say "oilfire1" ~2 Goto "Loop" #End fireburning = false; PublicVariable "fireburning"; exit Share this post Link to post Share on other sites
filth 0 Posted January 23, 2007 brilliant. added a well1 = false to a seperate trigger that changes the status of the objective back to active if the fire is relit and used your script changes... and it works perfectly. thanks m8. filth. Share this post Link to post Share on other sites