Ability to play sounds only in LOS

Ability to play sounds only in LOS

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Ability to play sounds only in LOS

Post by Jools »

In order to make sounds more contextual, I'm exploring the ways to only play them when the player has line of sight. Currently mod sounds from weapons are played by the engine from weapons.tdf using the tags soundstart for shooting a projectile, and soundhit for the explosion sound. But is there a way to make these be contingent upon having line of sight?

Only hack I can think of is replacing those sound files with dummy, silent sounds and handling the explosion sounds myself, via tracking projectiles and explosions. But that is unelegant and hackish. Any better solution? Is this already possible?
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: Ability to play sounds only in LOS

Post by Anarchid »

There are other things that betray stuff outside los, like smoke emitted from units. This is of no direct relevance, but i'd like a way to handle that too.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Ability to play sounds only in LOS

Post by Jools »

Yes, but smoke (and all other CEGs) can be fixed by changing a parameter in the CEG: set "alwaysVisible=0".
Post Reply

Return to “Feature Requests”