wizzywig 0 Posted May 5, 2004 hi just adding some sounds to my launcher and missile i im getting a problem as im useing playsound "Sound name" just wondering how i get it so that the sound is not global and is used only in that addon so it can not be heard from othere side of map Share this post Link to post Share on other sites
vektorboson 8 Posted May 5, 2004 Use _yourunit say "soundclass" instead of playsound. Say is always bound to an object and will be only heard in a radius depending on loudness defined in your sound class. Share this post Link to post Share on other sites
wizzywig 0 Posted May 5, 2004 ok i tryed that but i dont get any sound now my config looks like this <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgSounds { class wizchoke { name="wizchoke"; sound[]={"\Tom\Sounds\choke.ogg",db+10,1}; titles[]={}; }; class tomlaunch { name="tomlaunch"; sound[]={"\Tom\Sounds\launch.ogg",db+10,1}; titles[]={}; }; class tomcover { name="tomcover"; sound[]={"\Tom\Sounds\cover.ogg",db+10,1}; titles[]={}; }; class tompod { name="tompod"; sound[]={"\Tom\Sounds\pod.ogg",db+10,1}; titles[]={}; }; class tompis { name="tompis"; sound[]={"\Tom\Sounds\pis.ogg",db+10,1}; titles[]={}; }; }; and the script using it looks like this <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_truck = _this select 0 _truck setfuel 0 _truck say "tomcover" _truck animate ["Rightc", 1]; _truck animate ["Leftc", 1]; _truck animate ["coverb", 1]; ~3.2 _truck say "tompod" _truck animate ["pod", 1]; _truck say "tompis" _truck animate ["piston", 1] ~8 [_truck] exec "\GLCMtubes\system.sqs" Share this post Link to post Share on other sites
DaSquade 0 Posted May 5, 2004 Only thing i can see that is wrong (if i'm not wrong ) is your sound class: class wizchoke { name="wizchoke"; sound[]={\Tom\Sounds\choke.ogg,db+10,1}; titles[]={}; Though you didn't need the " in your sound[]={\addonsound path.ogg,db+10,1}; Well, that is how i cfg my sounds and they work. Hope it works for you. Share this post Link to post Share on other sites
wizzywig 0 Posted May 5, 2004 ok ill go try that now gimme 5mins Share this post Link to post Share on other sites
wizzywig 0 Posted May 5, 2004 nope still no sound at all Share this post Link to post Share on other sites
wizzywig 0 Posted May 5, 2004 sounds work with playsound but thats global Share this post Link to post Share on other sites
Sgt_Eversmann 1 Posted May 5, 2004 Hey great Tomahawk wizzywig Share this post Link to post Share on other sites
wizzywig 0 Posted May 5, 2004 thanks we are getting textures done as we speak im just adding some sound effects to the launcher and othere stuff like the rocket and exsplosion Share this post Link to post Share on other sites
wizzywig 0 Posted May 5, 2004 still not fixed any one wanna take a look at the config and sound file please pm me Share this post Link to post Share on other sites
vektorboson 8 Posted May 5, 2004 class CfgSounds { sounds[] = { "wizchoke", "tomlaunch", ... }; class wizchoke { ...... }; I don't know, whether it will work then, but I define the sounds[]-array in CfgSounds. Either I can't help you. You always can check the distance between the player and the launcher, and decide on this whether to play the sound or not. Share this post Link to post Share on other sites
wizzywig 0 Posted May 6, 2004 is that needed in a config of a addon Share this post Link to post Share on other sites
scfan42 0 Posted May 6, 2004 I think it is... give it a try Share this post Link to post Share on other sites
wizzywig 0 Posted May 6, 2004 ok i tryed it and got no error but still dont work Share this post Link to post Share on other sites
wizzywig 0 Posted May 6, 2004 ok just i case you see a problem <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #define TEast 0 #define TWest 1 #define TGuerrila 2 #define TCivilian 3 #define TSideUnknown 4 #define TEnemy 5 #define TFriendly 6 #define TLogic 7 #define true 1 #define false 0 #define private 0 #define protected 1 #define public 2 #define WeaponNoSlot 0 #define WeaponSlotPrimary 1 #define WeaponSlotSecondary 16 #define WeaponSlotItem 256 #define WeaponSlotBinocular 4096 #define WeaponHardMounted 65536 class CfgModels { class Default{}; class Vehicle: Default {}; class Tomahawkwiz: Vehicle { sections[]={""}; sectionsInherit=""; }; }; class CfgPatches { class Tomahawkwiz { units[] = {"Tomahawkwiz"}; weapons[] = {}; requiredAddons[] = {}; requiredVersion = 1.96; }; class SoldierEdeath { units[] = {SoldierEdeath}; weapons[] = {}; requiredVersion = 1.75;}; }; class CfgVehicles { class All {}; class Static: All {}; class Building: Static {}; class Strategic: Building {}; class Target: Strategic {}; class Dummy: Target { scope=2; destrType="DestructTree"; side=0; icon="Unknown_object"; model="\Tom\dummy.p3d"; accuracy=0.200000; cost=0; armor=10; }; class AllVehicles:All{}; class Land : AllVehicles {}; class Man : Land {}; class Soldier : Man {}; class SoldierEB : Soldier {}; class SoldierESaboteur : SoldierEB{}; class SoldierEdeath: SoldierESaboteur { scope=2; displayName="Spetsnaz death"; weapons[]={"AK74SU","NVGoggles","Binocular","Throw","Put"}; magazines[]={"AK74","AK74","AK74","AK74","HandGrenade","HandGrenade","HandGrenade","HandGrenade","HandGrenade","HandGrenade"}; }; class Air {}; class Plane: Air {}; class A10: Plane {}; class Tomahawkwiz : A10 { vehicleclass="wiz"; crew="SoldierEdeath"; scope=2; side=0; displayName="Tomahawk"; nameSound="plane"; accuracy=0.300000; maxSpeed=900; ejectSpeed[]={0,0,0}; armor=25; cost=50000; model="\TOM\tom.p3d"; weapons[]={}; magazines[]={}; fov=0.500000; landingAoa="7*3.1415/180"; driverAction="ManActCessnaPilot"; transportSoldier=0; threat[]={0.100000,1,0.700000}; aileronSensitivity=0.30000; elevatorSensitivity=0.300000; soundEngine[]={\tom\Sounds\tuboprop.ogg,db+15,1}; noseDownCoef=0.30000; irScanRange=0; irScanGround=0; animated=1 class Animations { class finFR { type="rotation"; animPeriod=4 selection="finFR"; axis="osa_finFR"; angle0=0; angle1=-1.4; }; class finFL { type="rotation"; animPeriod=3; selection="finFL"; axis="osa_finFL"; angle0=0; angle1=-1.4; }; class finBT { type="rotation"; animPeriod=3; selection="finBT"; axis="osa_finBT"; angle0=0; angle1=-1; }; class finBB { type="rotation"; animPeriod=3; selection="finBB"; axis="osa_finBB"; angle0=0; angle1=-1; }; class finBL { type="rotation"; animPeriod=3; selection="finBL"; axis="osa_finBL"; angle0=0; angle1=-1; }; class finBR { type="rotation"; animPeriod=3; selection="finBR"; axis="osa_finBR"; angle0=0; angle1=-1; }; }; class Viewoptics { initAngleX=0 minAngleX=0 maxAngleX=0 initAngleY=0 minAngleY=0 maxAngleY=0 initFov=0.300000; minFov=0.050000; maxFov=1.200000; }; }; }; class CfgSounds { sounds[] = { "wizchoke", "tomlaunch","tomcover","tompod","tompis"}; class wizchoke { name="wizchoke"; sound[]={\Tom\Sounds\choke.ogg,db+60,1}; titles[]={}; }; class tomlaunch { name="tomlaunch"; sound[]={\Tom\Sounds\launch.ogg,db+60,1}; titles[]={}; }; class tomcover { name="tomcover"; sound[]={\Tom\Sounds\cover.ogg,db+60,1}; titles[]={}; }; class tompod { name="tompod"; sound[]={\Tom\Sounds\pod.ogg,db+60,1}; titles[]={}; }; class tompis { name="tompis"; sound[]={\Tom\Sounds\pis.ogg,db+60,1}; titles[]={}; }; }; and the script that should run it looks like <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_truck = _this select 0 _truck setfuel 0 _truck say "tomcover" _truck animate ["Rightc", 1]; _truck animate ["Leftc", 1]; _truck animate ["coverb", 1]; ~3.2 _truck say "tompod" _truck animate ["pod", 1]; _truck say "tompis" _truck animate ["piston", 1] ~8 [_truck] exec "\GLCMtubes\system.sqs" Share this post Link to post Share on other sites
wizzywig 0 Posted May 6, 2004 still have the same problem any help please Share this post Link to post Share on other sites
Sgt_Eversmann 1 Posted May 6, 2004 Sorry I'm not a good config writer otherwise I would help you. But do you still need a texturer? Maybe I could help you. What does the 1 after the db+60 mean? Share this post Link to post Share on other sites
stoppelhopser 0 Posted May 6, 2004 hm, that´s really strange. i looked at a config i wrote for an addon, and except that i put the file path in hyphans it´s all the same and it works... class CfgSounds { sounds[]={DX_CutWireSnd}; class DX_CutWireSnd { sound[]={"\DX_wire\snd\cutwire",1,1}; name = "DX_CutWireSnd"; titles[] = { }; }; }; in the script i use _unit say "DX_CutWireSnd". on the other hand i use a wss file instead of ogg... but that doesnt seem to be the problem since playsound works for you... maybe try to code your sound declaration like i did and try again. i am pretty sure this shouldn´t be the matter, but who knows... Share this post Link to post Share on other sites
wizzywig 0 Posted May 6, 2004 hm, that´s really strange.i looked at a config i wrote for an addon, and except that i put the file path in hyphans it´s all the same and it works... class CfgSounds { sounds[]={DX_CutWireSnd}; class DX_CutWireSnd { sound[]={"\DX_wire\snd\cutwire",1,1}; name = "DX_CutWireSnd"; titles[] = { }; }; }; in the script i use _unit say "DX_CutWireSnd". on the other hand i use a wss file instead of ogg... but that doesnt seem to be the problem since playsound works for you... maybe try to code your sound declaration like i did and try again. i am pretty sure this shouldn´t be the matter, but who knows... ok i used wss files this fixed it thanks Share this post Link to post Share on other sites