Home   Help Search Login Register  

Author Topic: sound to objects in mp  (Read 673 times)

0 Members and 1 Guest are viewing this topic.

bad_fingers

  • Guest
sound to objects in mp
« on: 13 Sep 2005, 00:34:50 »
im trying to set a ogg file to play from an object like an empty jeep. To sound like the radio in the jeep is p-laying when you near the vehicle.  Ive tried a few things but cant get it to find the ogg file in my mission folder....  HELPPPPPP!!!

Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
Re:sound to objects in mp
« Reply #1 on: 13 Sep 2005, 01:03:05 »
Do you have a description.ext file that clearifies the file's whearabouts and such?
I like your approach, lets see your departure.
Download the New Flashlight Script!

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:sound to objects in mp
« Reply #2 on: 13 Sep 2005, 14:29:53 »
Assuming you do have the sound file in the correct folder and are defining the resource correctly in description.ext.  Then do the following

_soundobj = "logic" createvehicle [0,0,0]
_soundobj setPos getPos vehiclename
_soundobj say "whateveryouhavecalledyoursound"

Later do a

deleteVehicle _soundobj

The above assumes you are doing all this in a script.  To do it in a trigger put this in the activation field:

soundobj = "logic" createvehicle [0,0,0];soundobj setPos getPos vehiclename;soundobj say "whateveryouhavecalledyoursound"

Then later have a trigger that has the following:

deleteVehicle soundobj

(Note the absence of an underscore if you are using a trigger)






Offline Trapper

  • Honoured Contributor
  • ***
  • I'm a llama!
Re:sound to objects in mp
« Reply #3 on: 13 Sep 2005, 17:44:29 »
Just in case this is the reason:

Sound files for your missions, always have to be in YourMission\sound folder.

And in description.ext you have to write for example:
class carhit1{name = "";sound[] = {"carhit1.ogg", db-45, 1.0};titles[] = {0};};
« Last Edit: 13 Sep 2005, 17:45:34 by Trapper »