Fabiano-VIKING Posted February 11, 2022 Posted February 11, 2022 Hi guys! I would like to play a sound when loading and unloading crates when using CTLD. But I would like this audio to sound only to the player who is actually loading/unloading the cargo, and not to play the sound to all the players online. Is that possible in the Lua Scrip? What code line could I use to do that? I hope I made myself clear... English is not my first language and I'm not a programmer either... I'm just messing around with the CTLD script. Thanks for your support!
toutenglisse Posted February 15, 2022 Posted February 15, 2022 On 2/11/2022 at 6:33 PM, Fabiano-VIKING said: Hi guys! I would like to play a sound when loading and unloading crates when using CTLD. But I would like this audio to sound only to the player who is actually loading/unloading the cargo, and not to play the sound to all the players online. Is that possible in the Lua Scrip? What code line could I use to do that? I hope I made myself clear... English is not my first language and I'm not a programmer either... I'm just messing around with the CTLD script. Thanks for your support! You need to use the trigger.action.outSoundForGroup(number groupId , string soundfile ) function (all units of the group will hear it - function does not exist for unit only). But you need to get the groupID of the group that is loading/unloading crates, using datas from CTLD function (I can't tell exactly where/what to get from this script) 1
Fabiano-VIKING Posted February 15, 2022 Author Posted February 15, 2022 That already helped a lot! Thanks a lot bud!! I will take a better look! Thanks!
Recommended Posts