Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

wait, how would I code "play" then? I dont really know how to make it play only the dima files. because it just plays what's written in the box, but the buttons are assined to "play[ka_dima"]. but the play doesnt see that and only sees the basic syllables "ka" without the _dima labe.
sorry if this is confusing im bad at explaining... btw if you have discord we can talk there.. mine is 11dimaofficial11

(1 edit)

Ah, my bad! I didn't look at how the play button script was written. I'm not at home now, but I'm sure someone else can take a look at it for you soon. There should be a way to tell Decker to add the "dima" onto the back on to the words before playing them.

(2 edits) (+1)

The play[] function casts its first argument to a string, so you can use "," to join together several string fragments and add a prefix or suffix:

play["dima_",me.text]
play[me.text,"-of-dima"]

You could alternatively use "format", which is a little more complicated but much more flexible:

play["dima_%s" format me.text]
play["%s-of-dima" format me.text]

To support multiple voices, you then need some way of identifying the current speaker. Currently you're using different cards for different speakers, which has its own advantages, like allowing for character art or special catchphrase buttons or something. If the card names corresponded to the prefix for sound clips you could do something like

play[card.name,me.text]    # in the phoneme buttons
play[card.name,word]       # in the "play" button

Or you could simply use different versions of the scripts on different cards; whatever you find simpler.

One note that may be helpful if you aren't already aware is that if you select multiple widgets you can edit all their scripts at once by choosing "Widgets -> Script..." from the menu.

thank you!!! :D

(1 edit)

also, sorry if im asking too many questions, but is there a way to put buttons (widgets) into a field? so you could put all of the buttons into a field and search with the slider. because one card is not enough to put all the needed sylables... sorry for disturbanceexample