Home   Help Search Login Register  

Author Topic: Say...  (Read 654 times)

0 Members and 1 Guest are viewing this topic.

Offline Platoon Patton

  • Members
  • *
  • "Barbecue" CreateVehicle getpos LLama
Say...
« on: 15 Aug 2005, 17:38:26 »
Object say [sound, maxTitlesDistance].

Can somebody give some info on Maxtitledistance?

If I use Object say "sound" I only hear the sound when I am very close to the object...

That also means I am dead in a few milliseconds :beat:


I want to hear the sound from far away,but ofcourse more silent.

http://www.platoon-clan.com/ We always wellcome dedicated OFP players :)

http://www.european-combat-league.com/index.php To play with us in the best OFP league ;)

bored_onion

  • Guest
Re:Say...
« Reply #1 on: 15 Aug 2005, 19:15:11 »
AFAIK (which may not be too far...)

you can just follow the syntax:

Code: [Select]
unit say "sound"
and it works fine.

as for hearing from far away you could make the unit say it (or just not bother) and also use

Code: [Select]
playsound "sound"

at the same time (if necessary then you can reduce the volume on the sound using a program like audacity)

Offline Pilot

  • Contributing Member
  • **
Re:Say...
« Reply #2 on: 15 Aug 2005, 19:19:16 »
I thought the volume could be defined in description.ext?

I don't hae an example atm, so I can't show you exactly where :-\  Just look for db somewhere in the part where the sounds are defined.  That should be the volume in decibles.

-Student Pilot

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Say...
« Reply #3 on: 15 Aug 2005, 19:25:30 »
Here is an example:
Code: [Select]
  class mine1
   {
      name = "";
      sound[] = {"\sound\gravel_L.ogg", db-10, 1.0};
      titles[] = {};
   };

the field that has the db number in it is the one.  Set it to + increase the volume.  Remember decibels is a logrithmic scale so that large changes might be necessary to have a significant effect.

I have also seen that field expressed without the db, just as a number.  I guess that this is a scalling factor of the sound volume <1 for quieter, >1 for louder.


bored_union is absolutley right.
« Last Edit: 15 Aug 2005, 19:25:55 by THobson »

Offline C0LDSt33L

  • Members
  • *
  • Member of the SotM Team
Re:Say...
« Reply #4 on: 15 Aug 2005, 19:31:24 »
You could use the distance command to tell you how close the player is and if he is in audable range then have the unit "say" it if he is and if not to "PlaySound" to play a quieter (as defined in description.ext) version of the same file.

Offline Platoon Patton

  • Members
  • *
  • "Barbecue" CreateVehicle getpos LLama
Re:Say...
« Reply #5 on: 15 Aug 2005, 19:39:30 »
Thanx guys,

I think I will use 3 different soundfiles with 3 different db values,check the distance and Playsound "" the most silence when far away...etc...

 :cheers:
http://www.platoon-clan.com/ We always wellcome dedicated OFP players :)

http://www.european-combat-league.com/index.php To play with us in the best OFP league ;)