Jump to content

Need to place a sound that will fade with distance


temnix

Recommended Posts

Can sounds played on creatures be made to fade with distance the way ambients do? When I want a creature to issue a sound all the time, I put a VVC on it, attached, with a blank file for the animation but looping and playing a sound. It can be heard anywhere in the area, though, even from the edge. Another way to put a sound on a spot is to make a Casting glow-type projectile and shoot it there with "Loop fire sound" on, but this also reaches everywhere. Are there any other ways to do this?

Link to comment

Now that 17 people, including myself, have looked into this topic and 0 have had suggestions, I'd like to propose a solution myself. It's not perfect, the sound's volume doesn't change, but it can be made to stop with distance, at least. You take that creature you want to emit the sound (could be an invisible minion, could be a fountain...) and put blocks like these in its script: 

IF
    Global("SEEING","LOCALS",0)
    Detect([GOODCUTOFF])
    THEN

    RESPONSE #1
    ApplySpellRES("SEEIN+_#",Myself)
    END
    
IF
    Global("SEEING","LOCALS",1)
    !Detect([GOODCUTOFF])
    THEN

    RESPONSE #1
    ApplySpellRES("SEEIN-_#",Myself)
    END

The first spell will turn on a Play visual effect, looping with sound, like I said before, and use effect 309 to set a local variable, SEEING, to 1. The second spell will remove the effects of the first and set SEEING to 0 when there are no friendlies by the sound anchor. You can use Range there as well, if you want a shorter distance, or keep the code as it is but vary the creature's visual range. A bonus to vision will make the sound start playing before the arriving character sees the source, which may be more natural. The sound of your fountain, or the hum of the circle of magic mushrooms, or the wail of the restless spirit, or the clash of swords on the place of the last battle, or what it is you want to play, should be made wave-like, with lowering and rising parts, up and down slightly. This way its sudden stop or start will be more believable to the player's ear.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...