Home   Help Search Login Register  

Author Topic: Sound problem?  (Read 903 times)

0 Members and 1 Guest are viewing this topic.

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Sound problem?
« on: 13 Jul 2003, 10:50:28 »
ok im makeing a Abomb addon and i have set up the cpp corectly and i think the scripts are set up corectly but in game the scripts work but with out the sound effects what did i do wroung?


config

Code: [Select]
// some basic defines
#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

// type scope
#define private 0
#define protected 1
#define public 2


class CfgPatches
{
   class nuke
   {
   units[] = {"nuke"};
   weapons[] = {};
   requiredVersion = 1.07;

};
};

class CfgVehicles
{
class All {};
class Static:All {};
class Building:Static {};
class NonStrategic:Building {};
class Fence: NonStrategic {};
class FenceWood:Fence {};
class Strategic:Building {};
class Shed: Strategic {};
class Barracks:Shed {};
class Fortress3:Barracks {};

class nuke:Fortress3
{
side = TCivilian;
vehicleClass="Nukes and stuff";
icon="\nuke\nukeicon";
model="\nuke\nuke.p3d";
armor=20;
scope=2;
displayName="ABomb";
simulation="house";
mapSize = 16;
animated=1
class Animations
   {
   class key
   {
      type="rotation";
      animPeriod=0.0001;
      selection="key";
      axis="osa_key";
      angle0=0;
      angle1=3.14;
      };         
        };
   class UserActions
   {
   class key
   {
   displayName="Activate Bomb";
   position="osa_key";
   radius=5;
   condition="this animationPhase ""key"" < 0.5";
   statement="[this] exec ""\nuke\Scripts\Abomb.sqs"";"
          };
      };
      class eventhandlers
            {
                init = "[_this select 0] exec ""\nuke\Scripts\killed.sqs"";"
   };
     };
};
class CfgSounds
{
  class Nuke1
  {
    name = "Nuke1";
    sound[]={\nuke\scripts\Nuke1.ogg,db+80,1};
    titles[] = {};
  };

  class alarm
  {
    name = "alarm";
    sound[]={\nuke\scripts\alarm.ogg,db+80,1};
    titles[] = {};
  };

  class wind
  {
    name = "wind";
    sound[]={\nuke\scripts\wind.ogg,db+80,1};
    titles[] = {};
  };
 };

one of the scripts but not the compleat one as i dont wont it relised yet

Code: [Select]
this exec "\nuke\scripts\sound.sqs"
hint "Warhead...ARMED!!"
~1
hint "30 seconds till detonation"
~1
hint "29"
~1
hint "28"
~1
hint "27"
~1
hint "26"
~1
hint "25"
~1
hint "24"
~1
hint "23"
~1
hint "22"
~1
hint "21"
~1
hint "20"
~1
hint "19"
~1
hint "18"
~1
hint "17"
~1
hint "16"
~1
hint "15"
~1
hint "14"
~1
hint "13"
~1
hint "12"
~1
hint "11"
~1
hint "10"
~1
hint "9"
~1
hint "8"
~1
hint "7"
~1
hint "6"
~1
hint "5"
~1
hint "4"
~1
hint "3"
~1
hint "2"
~1
hint "1"
~1
hint "Danger!!!"
~1
hint "DANGER!!!"

~3
[_obj] exec "\nuke\scripts\bomb.sqs"
[40,"column"] exec "\nuke\scripts\nuke.sqs"
[_obj,_dir] exec "\nuke\scripts\shaking.sqs"

sound.sqs

Code: [Select]
this say "alarm"
~30
this say "Nuke1"
~1
this say "wind"

What have i to do to get this to work

stoppelhopser

  • Guest
Re:Sound problem?
« Reply #1 on: 13 Jul 2003, 19:50:11 »
not quite sure but maybe this does the trick:

[_this select 0]  exec "\nuke\scripts\sound.sqs"

Sound.sqs:
_Unit = _this select 0;
_Unit say "alarm"
~30
_Unit say "Nuke1"
~1
_Unit say "wind"

...but might also be crap ;D

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Re:Sound problem?
« Reply #2 on: 13 Jul 2003, 22:47:24 »
i tryed this but still no joy i think its to do with the config.cpp can some one have a look at it ill post it again

Code: [Select]
// some basic defines
#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

// type scope
#define private 0
#define protected 1
#define public 2


class CfgPatches
{
   class nuke
   {
   units[] = {"nuke"};
   weapons[] = {};
   requiredVersion = 1.07;

};
};

class CfgVehicles
{
class All {};
class Static:All {};
class Building:Static {};
class NonStrategic:Building {};
class Fence: NonStrategic {};
class FenceWood:Fence {};
class Strategic:Building {};
class Shed: Strategic {};
class Barracks:Shed {};
class Fortress3:Barracks {};

class nuke:Fortress3
{
side = TCivilian;
vehicleClass="Nukes and stuff";
icon="\nuke\nukeicon";
model="\nuke\nuke.p3d";
armor=500;
scope=2;
displayName="ABomb";
simulation="house";
mapSize = 16;
animated=1
class Animations
   {
   class key
   {
      type="rotation";
      animPeriod=0.0001;
      selection="key";
      axis="osa_key";
      angle0=0;
      angle1=3.14;
      };         
        };
   class UserActions
   {
   class key
   {
   displayName="Activate Bomb";
   position="osa_key";
   radius=5;
   condition="this animationPhase ""key"" < 0.5";
   statement="[this] exec ""\nuke\Scripts\abomb.sqs"";"
       Â Â Â };
      };
      class eventhandlers
            {
                init = "[_this select 0] exec ""\nuke\Scripts\killed.sqs"";"
   };
    };
};          <----when i take this out game dont start only the ( }: ) part of it
class CfgSounds
{
  class Nuke1
  {
  sound[]={"\nuke\scripts\Nuke1.ogg",db+10,1};
  name = "Nuke1";
  titles[] = {};
  };
  class alarm
  {
  sound[]={"\nuke\scripts\alarm.ogg",db+10,1};
  name = "alarm";
  titles[] = {};
  };
  class wind
  {
  sound[]={"\nuke\scripts\wind.ogg",db+10,1};
  name = "wind";
  titles[] = {};
 Â Â Â  };
     };
 };
« Last Edit: 13 Jul 2003, 22:49:25 by wizzywig »

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Re:Sound problem?
« Reply #3 on: 17 Jul 2003, 10:32:57 »
any more idears