Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

"Smart Speaker" settings for Message Sounds is using the wrong preset

A topic by fallenlorelei created Jan 01, 2024 Views: 48 Replies: 3
Viewing posts 1 to 3

I have two speakers right now. The "Smart Speaker" settings work for their names using Auto Speaker. But when using the Message Sounds, it's picking the wrong preset. 

If speaker 1 has id 1 for their message sound, and speaker 2 has id 2 for their message sound, speaker 1 ends up using message sound id 2 and speaker 2 doesn't have any sounds.

So then I switched speaker 2 to use id 1, and now they're both using sound id 2.

Hard to describe sounds through writing, I know ... ! 

Here are the settings: (edit, I forgot I can't post pictures without itch yelling at me)

  • Filename: UI_Button_Click_07
  • Interval: 4
  • SE Config: 80, 150, 0
  • Variation Config: 5, 10, 0
  • ID: 1


  • Filename: UI_Button_Click_08
  • Interval: 4
  • SE Config: 80, 150, 0
  • Variation Config: 5, 10, 0
  • ID: 2


They are both 1 and 2 of the array fields respectively, just in case, although I'm pretty sure I'm using the Id #s correctly here.

Then for the Smart Speakers, I have


  • Face Image: Aery_Pixel_Face-nohat
  • Index: 0,1,2,3,4,5,6,7
  • Speaker Name: Aery
  • Window Skin: [blank]
  • Font Face: [blank]
  • Message sound id: 1


  • Face Image: Seraphina_Pixel_Face
  • Index: 0,1,2,3,4,5,6,7
  • Speaker Name: Seraphina
  • Window Skin: [blank]
  • Font Face: [blank]
  • Message sound id: 2


With these settings, Aery is speaking with message sound 2 and Seraphina doesn't get any sounds. Then when I switch Seraphina to message sound 1, just for testing, they both end up using message sound 2.

And now I just put them both to message sound 2, for testing, and neither is using any sounds now. Oof.

Am I misunderstanding the ID system? Let me know if there's something I can change to fix this weirdness :) Thanks so much for your help!

Developer

Hi there!

I think I understood what was happening. The array positions in javascript always start at 0:

  • Index 0 =  First array item
  • Index 1 = second array item

And so on. On the Message sound plugin, you have only two SE presets on the plugin parameter. Therefore, you only have array items/indexes 0 and 1.

But, you are using numbers to define their ID(1 and 2). As such, when the plugin tries to change the SE to be played and he identifies that the SE ID is a number, it does not search by ID but by the array index. This is where the problem lies. Since it does not find the right index, it plays the default SE ID set on the Message Sound plugin parameter.

SOLUTION

I understand that these details may not be so simple for someone without a coding background, so, instead of using numbers for the SE Presets ID, use words:

MESSAGE SOUND SETTINGS:

  • Filename: UI_Button_Click_07
  • Interval: 4
  • SE Config: 80, 150, 0
  • Variation Config: 5, 10, 0
  • ID: Aery_Se
  • Filename: UI_Button_Click_08
  • Interval: 4
  • SE Config: 80, 150, 0
  • Variation Config: 5, 10, 0
  • ID: Seraphina_Se

SMART SPEAKER SETTINGS:

  • Face Image: Aery_Pixel_Face-nohat
  • Index: 0,1,2,3,4,5,6,7
  • Speaker Name: Aery
  • Window Skin: [blank]
  • Font Face: [blank]
  • Message sound id: Aery_Se
  • Face Image: Seraphina_Pixel_Face
  • Index: 0,1,2,3,4,5,6,7
  • Speaker Name: Seraphina
  • Window Skin: [blank]
  • Font Face: [blank]
  • Message sound id: Seraphina_Se

Watch out for blank spaces and case-sensitives, I just saw on my plugin codes that I did not remove them on the checks. Meaning "Aery_Se" is different than " aery_se". But I will fix that in the next update.

Hope I manage to clarify!

(+1)

Eyyy, that did the trick! Thanks so much!! I changed the ids to text, aery_se and seraphina_se, and it works great. Hooray~ Appreciate the fast response too.

Developer

Nice! Have fun :)