dmarkwick 261 Posted September 25, 2006 I got a mission where in about 30 random farmsteads & buildings across the map I have ammo crates each with a 10% chance of existing. Sort of like a found resistance cache. I find that the people playing the mission don't really do the sniffing around that I'd hoped for, so I thought that I would maybe attach a sound, say frogs, to an area that has an ammo crate. My question: how can I tie the probability of existance of a frog croak object to the existence of the ammo crate object? Share this post Link to post Share on other sites
ProfTournesol 956 Posted September 25, 2006 1. Name your crates (crate1, crate2 etc..) ; 2. Crate a trigger for each crate, with the frogs sound as "effects", at the position of the crate, with this on the condition line (for "crate1" for example) : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">alive crate1 Very long cause you've got 30 possible crates...and 30 triggers ! Or : find a frog sound, put it in the mission folder with the appropriate description file, and create a looping script playing this sound, such as : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _crate = _this select 0 #soundloop _crate say "frogs" ; if "frogs" is the config name of the sound, defined in the description file ~10 ;if 10 seconds is the length of the sound goto "soundloop" If the name of the script is "frog.sqs", you launch it in the init line of the crates : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[this] exec "frogs.sqs" Much easier, because once you've got the sound and its config through the description file, you can copy and paste the 30 crates cause they've got the same init launching the same script. To create a script file and a description file, you can get Chris' OFP script editor. Share this post Link to post Share on other sites
dmarkwick 261 Posted September 25, 2006 Thanks for the ideas Pity you can't group non-AI objects really Share this post Link to post Share on other sites