Author Topic: Is there any way to STOP playing a sound?  (Read 2224 times)

Offline Loriel

  • Planewalker
  • *****
  • Posts: 390
  • Gender: Male
    • Loriel's Downloads
Is there any way to STOP playing a sound?
« on: July 18, 2004, 12:37:31 AM »
For playing a sound, I know of the PlaySound() scripting action and effect #174 Play Sound Effect.  Is there a way to stop playing a sound through scripting or an effect?  I tried playing a sound over the first one, but they simply overlap without canceling the first one.  Any ideas?

Offline Ghreyfain

  • Moderator
  • Planewalker
  • *****
  • Posts: 4705
  • Gender: Male
    • Pocket Plane Group
Re: Is there any way to STOP playing a sound?
« Reply #1 on: July 18, 2004, 03:13:24 AM »
I don't think that's possible, no.
Earn Money Sleeping.

Offline Loriel

  • Planewalker
  • *****
  • Posts: 390
  • Gender: Male
    • Loriel's Downloads
Re: Is there any way to STOP playing a sound?
« Reply #2 on: July 18, 2004, 03:32:03 AM »
That's what I was afraid of...thanks anyways.

Offline Cuv

  • Planewalker
  • *****
  • Posts: 79
Re: Is there any way to STOP playing a sound?
« Reply #3 on: July 18, 2004, 03:40:17 AM »
You can do it in a script for a cutscene or trap if you know the name of the ambient used in the area file.

Turn Off:

AmbientActivate("nameforscripts",FALSE)

Turn On:

AmbientActivate("nameforscripts",TRUE)

What type of sound do you need to deactivate and when?   Spell?  Ambient?  Hit? Dialog?  Is it something that has to be turned off on-the-fly?  Or is it something that can be removed through editing before it happens?

Cuv

Cuv

Offline Loriel

  • Planewalker
  • *****
  • Posts: 390
  • Gender: Male
    • Loriel's Downloads
Re: Is there any way to STOP playing a sound?
« Reply #4 on: July 20, 2004, 03:52:34 AM »
I'm making an iPod for BG2 on request.  The song starts from a spell that uses effect #174.  I thought of AmbientActivate(), but that's tied to an area, and this needs to go anywhere.  The idea was to allow one song to cancel another one, but I don't know that it will be possible.

Offline Idobek

  • Dust Bunny
  • Planewalker
  • *****
  • Posts: 431
  • Gender: Male
Re: Is there any way to STOP playing a sound?
« Reply #5 on: July 20, 2004, 04:17:40 AM »
The Gibberlings Three Forums

<SimDing0> Did you know G3 has secret forum rules?
<CamDawg> Yep. They're generally of the nature 'don't annoy Idobek.'

Offline Cuv

  • Planewalker
  • *****
  • Posts: 79
Re: Is there any way to STOP playing a sound?
« Reply #6 on: July 20, 2004, 02:20:19 PM »
I'm making an iPod for BG2 on request.  The song starts from a spell that uses effect #174.  I thought of AmbientActivate(), but that's tied to an area, and this needs to go anywhere.  The idea was to allow one song to cancel another one, but I don't know that it will be possible.

Hmmm... that is an interesting problem.    What you 'could' do, is rethink the way the song is played.   Play it on a an invisible creature instead.  Have your spell or a script create that creature... then use SoundActivation("MyCritter",FALSE)

Will require a ton of scripting,  but doable.

Cuv

Offline Loriel

  • Planewalker
  • *****
  • Posts: 390
  • Gender: Male
    • Loriel's Downloads
Re: Is there any way to STOP playing a sound?
« Reply #7 on: July 20, 2004, 03:13:41 PM »
@Cuv
That's an interesting idea.  I'm not afraid of a lot of scripting...it seems like that's all I've been doing for the last year!  I was looking in IESDP, though, and I couldn't find SoundActivation anywhere.  I have an action.ids file (perhaps from Cirerrek) that has it, but it occupies the slot that SetRestEncounterProbabilityNight(I:Prob*) uses.  Could you explain what that action does for me (I work better with concepts than simply filling in the blanks).  Does it simply mute anything the creature says?  Do I need to use SetPlayerSound() first or have the song in one of the sound slots?

P.S.
Apparently, IESDP has 316 SetRestEncounterProbabilityNight(I:Prob*) as a duplicate from 315 SetRestEncounterProbabilityNight(I:Prob*).  Maybe when (if) TeamBG comes back up, this can be fixed.

Offline Cuv

  • Planewalker
  • *****
  • Posts: 79
Re: Is there any way to STOP playing a sound?
« Reply #8 on: July 20, 2004, 03:54:12 PM »
Sorry,  it's SoundActivate(), 316    not SoundActivation:P

I havent actually tried this action, so I dont know.  But you have other options too.   IF that action is broken, then you can simply destroy the creature that makes that song in a script as needed.   What you could do is assign that song to its INVENTORY_FULL sound slot... load the creature up with heavy undroppable objects(custom if needed), so that it would play the sound over and over again.   Then kill it when you want the song to stop.. or switch to another sound slot.   Just an idea.

Just trying to brainstorm for you and think outside the box ;D     If you want it bad enough, a way can be found to make it work.   Most of the hardcoded crap in the Infinity Engine can be worked-around if you try hard enough.  Heh

Cuv

Offline Loriel

  • Planewalker
  • *****
  • Posts: 390
  • Gender: Male
    • Loriel's Downloads
Re: Is there any way to STOP playing a sound?
« Reply #9 on: July 20, 2004, 05:14:32 PM »
Just trying to brainstorm for you and think outside the box ;D     If you want it bad enough, a way can be found to make it work.   Most of the hardcoded crap in the Infinity Engine can be worked-around if you try hard enough.  Heh

Heh, I should know this by now.  I am finishing a mod that brings the features of ToB to SoA (HLA's, Spells, Wild Mage, etc).  I was told not to attempt it because it's impossible, but what they should have said was that it would be way more work than it's worth!  lol

Thanks for the help. I'll give it a try and report back.

Offline Loriel

  • Planewalker
  • *****
  • Posts: 390
  • Gender: Male
    • Loriel's Downloads
Re: Is there any way to STOP playing a sound?
« Reply #10 on: July 20, 2004, 05:34:32 PM »
Oops...forgot about this one problem.  For some reason, I can't get invis/invul creatures to appear without a visual cue.  I have used igi's tutorial, and the normal smoke doesn't appear, but I get the SPGFLSH1.BAM animation when the creature appears.  I know someone else had this problem, but the thread was over at TeamBG, so I can't provide a link right now.  If anyone else has figured this out, please let me know.  I'm using a Mac with the latest version of SoA and Baldurdash.

Offline Cuv

  • Planewalker
  • *****
  • Posts: 79
Re: Is there any way to STOP playing a sound?
« Reply #11 on: July 21, 2004, 02:57:12 AM »
It's funny,  I have never once encountered this visual problem I keep hearing about with regards to creating invisible creatures ???   Hehe... they are supposed to be,  well... invisible  ;D ;D ;D

CreateCreatureObject?

CreateCreatureOffScreen?

You dont have to create it with a spell.   Is that was is happening?   Take a look at Ascension's  FINIREN.bcs in the blocks for his project image and simulacrum.  ... or  maybe something is  wrong with your creature?   Just copy out FINRAT.cre and rename that beast if you get in a pickle.   Hope that helps

Cuv

Offline Loriel

  • Planewalker
  • *****
  • Posts: 390
  • Gender: Male
    • Loriel's Downloads
Re: Is there any way to STOP playing a sound?
« Reply #12 on: July 21, 2004, 03:39:51 AM »
You're right, there are other ways of getting the creature into the game.  I was using a spell to summon it.  I guess I just prefer using effects to scripting whenever possible.  Perhaps it's an SoA thing.  It's just frustrating to not be able to get it to work.

In any case, I will try the CreateCreature() approach and report back.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: