No announcement yet.

Noob: How to play sound?

  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    great that works.
    thanks a lot :noob:

    Leave a comment:

  • replied
    When you use the PlaySound function, the actor it is called from plays the sound. In your case the mutator actor plays the sound. Mutators probably exist at the world origin and so aren't suitable for doing what you want.

    Luckily it is very easy to make a different actor play the sound, in your case the vehicle, from within the DriverEnteredVehicle function:
    The different slots are a convenient way to control which sounds play at the same time. Each slot can play only one sound at a time, so for instance if a sound is playing in SLOT_Interact for a particular actor and you call PlaySound with SLOT_Interact for it, the old sound will stop playing and they new one will start instead, whereas if you used a different slot, the one already playing in SLOT_Interact would keep playing. I hope that makes sense!

    Leave a comment:

  • started a topic Noob: How to play sound?

    Noob: How to play sound?


    I'm new to UnrealScript and currently playing around with Mutators..

    I just tried to add some custom sounds to vehicle enter/exit events, so I've extended the Mutator class and implemented the functions DriverLeftVehicle/DriverEnteredVehicle.

    The functions both get called correctly, but think I don't know enough to get a custom sound working..

    I've found tutorials about making Voice Packs, so i made a .uax containing some sounds, but how can I play my sounds in the mutator?

    In other sourcecodes I found some PlaySound calls, so I tried this:

    PlaySound(sound'MutSIWSounds.raus_he',,2.5*Transie ntSoundVolume);

    But how can I control where the Sound gets played? And what do the Different SLOT's mean? And finally I don't hear anything, even with higher volume levels and original game sounds!

    Is there a tutorial about that? Or can anyone explain the basics of playing sound for me, please?