Fortress Forever

Fortress Forever (https://forums.fortress-forever.com/index.php)
-   Mapping (https://forums.fortress-forever.com/forumdisplay.php?f=13)
-   -   Sound (For Players Ear Only) (https://forums.fortress-forever.com/showthread.php?t=18695)

span 01-13-2009 11:56 AM

Sound (For Players Ear Only)
 
Hi, this might just be me that's missed something very obvious. I've created custom sounds and successfully used them in my map.
But i want to be able to play these sounds for "players ear only" when they trigger a cirtain multiple... and not play the sound out loud for everyone. I couldnt find a flag option allowing me to do this as there was before.

Any way to fix this? via lua or are there other options i haven't yet discovered? /Thanks.

PartialSchism 01-13-2009 05:32 PM

http://forums.fortress-forever.com/s...ad.php?t=18349

Code:

BroadCastSoundToPlayer  ,  &FFLib::SendPlayerSound  ,
maybe? Idk the exact string.

Nuk3m 01-13-2009 10:44 PM

http://forums.fortress-forever.com/s...ad.php?t=18659

span 01-14-2009 11:12 AM

Hi.

Thanks for the help. I was able to work from your feedback and found this in hunted.lua. But since i am no genious at lua scripting im not sure how to bind this to a trigger_muntiple entity. Does anyone know?

Combine these?

Code:

trigger_broadcast = trigger_ff_script:new({})

function trigger_broadcast:ontouch( touch_entity )
        if IsPlayer( touch_entity ) then

and

Code:

--        if player:GetTeamId() == Team.kBlue then
--                BroadCastSoundToPlayer(player, "ff_examplemap.examplesound")
end


Bridget 01-14-2009 01:48 PM

Code:

trigger_broadcast = trigger_ff_script:new({})

function trigger_broadcast:ontouch( touch_entity )
        if IsPlayer( touch_entity ) then
                local player = CastToPlayer(touch_entity)
                if player:GetTeam() == Team.kBlue then
                        BroadCastSoundToPlayer(player, "ff_examplemap.examplesound")
                end
        end
end


span 01-15-2009 07:59 AM

Thanks! This might actually do it. I'll run the script tonight, posting result later!


All times are GMT. The time now is 11:58 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.