Jump to content

bool abSilent driving me nuts!..


Recommended Posts

Hi guys,

 

I'm using several simple functions in a script:

 

- EquiItem(...)

- UnequipItem(...)

- EquipItemX(...)

 

All of them are carefully set to abSilent = true - or equipSound = false for EquipItemX(...) - (in fact, the wiki has it wrong specifying that 'if bool equipSound = true, no sound will be played', it's actually the other way around).

 

Anyway, the thing is when I unequip weapons or armors, all sounds FX play full blast whereas when I reequip (exact same settings), it all remains perfectly silent.

 

I can't figure out why. In truth, I'm using this in custom functions which are later used in other functions, even using arrays for armors, so I'm wondering if the "abSilent" may not be lost from one function to another - but if so I still don't understand why my settings should be ignored in one case (unequiping) and respected in another (equiping).

 

Has any of you encountered that issue before?

Link to comment
Share on other sites

Try testing to see if a specific item set to make no sound when equipped also makes no sound when unequipped without specifying the sound status. It may be possible that an equipped item remembers that it is to make no noise and by "flipping" the bool on the unequipitem function you're actually turning the sounds back on.

 

Just a thought, I really have no idea...

Link to comment
Share on other sites

Oh... interesting thought, thanks.

 

I just did double check it all though and I don't don't think I may have missed a line (tho' it's kinda late) - but I hadn't thought about it being related to one specific item or object because it goes both for weapons and armors. I'm going to test that, let you know if you guessed right. Thanks again :).

Link to comment
Share on other sites

Oh... that's another possibility I hadn't thought about - I thought abSilent meant suppressing the message for AddSpell(...) or RemoveSpell(...) and for Equip/Unequip it meant the soundFX.

 

But you may be right, so far I haven't had better luck than yesterday - I'll try and see if I can get better results using the Mute function on soundFX.

 

Thanks :)

Link to comment
Share on other sites

@ lofgren:

 

My, you're right, I was completely mistaken, the abSilent bool affects the notification message, not the sound... and the Mute function is a SoundCategory script function: this means its effect will be persistent and even retroactive if you quit the game before your script called 'UnMute' - and that will affect the whole sound category... Better left untouched, I think...

 

Thanks, lofgren :)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...