Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

2 questions

A topic by D I M A created 71 days ago Views: 194 Replies: 10
Viewing posts 1 to 3
(1 edit) (+1)

Hello, so, as I was making the tts, I noticed a problem... when I wanna add a voice sample for another character... the sounds files in the same place. so when I wanna add another character, I have to change the sample's names.. but then the play button wouldn't work cause this is the scrypt. 

this

I stole it from Cylon I know

is there a way to.. "put the files in some folders" so they wouldnt repeat... yeah im bad at explaining..

and one more thing, how do I make so that when you use the decker project, you dont see the toolbar? Because some has have that and I dont know how to do that..

(2 edits) (+1)

Not exactly folders, but we can do it another way.

The "me.text" tells Decker to use the text that's attached to the thing running the script. But you can also call the second set of files something else and point at them by name without using me.text.

As an example, if you name each sound in the second set with the new voice's name before the syllable, something like "dima_ka" ... then DIMA's ka button could be written like this:

on click do     
 play["dima_ka"]
 phrase.text:phrase.text," ",me.text
end

The answer to your second question is under File > Properties. There's a button labeled "Protect..." which will save a copy of your project without the menu. 馃檪

(+1)

thanks!

(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.

Developer (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

I'm coming back up to the top layer for the new question (Hi!) also please don't worry about asking questions. It's fun seeing your project develop and it's good to have questions and answers out in the open so they can help other people too.

I'm not sure if it's possible to put buttons in fields, but I'm thinking about other types of solutions...

You can make even smaller buttons if you want. Not saying it's a good idea for every project, but it is possible.

(At this very tiny size they seem hard to click, especially on mobile, so there's some downsides. )

I assume you're trying to add more syllables (cool!). Do you know how many you'll want to have on one card in the final version?

Developer(+2)

There are some pretty small pixel fonts available in MSFonts.

Another option to explore would be using a scrollable rich-text field with a bunch of hyperlinks. The link[] event sent to a field is basically the same as the click[] event sent to buttons, except you get the value of the link, and it's an especially natural choice if most of the buttons have the same underlying script.

(+1)

Well the amount of syllables depends on the language. So far I was able to put all the Japanese syllables in one card, but for English there would be at least 300. Due to there being more than 6 vowels and a lot of constants. so for example, I have 8 vowels and 20 constants, they all need to be connected. I take "k" and add all the vowels, that's 8 syllables, multiply by 20, we get 160. But I also have to leave some space for the pause button, the vowels separately and the constants separately.