Nilom's Forum Posts

  • Hello there!

    For my android mobile app I need dynamic texts to be spoken. Therefore I wanted to use speech synthesis.

    The first problem is that I read about missing voices on mobile. Does Cordova even support speech synthesis and how many voices does it have?

    The second problem is that it doesn't sound good.

    So my workaround would be to use another service for that, to create naturally sounding audio files containing the words.

    Is it then possible to play one audio file after another to make it somewhat sound like a spoken sentence or is there a long delay? I can not test this yet so I would be thankful if someone who knows could tell me.

    Or if someone has an idea on how to save speech synthesis data to the project so that the same voices can be used, no matter on which device.

    Thank you very much!

  • Oh nooooo. I did a noob mistake because I copied that from the variables description.

    Thank you very much, solved!

  • Hello there!

    I want to loop through all available speech synthesis voices and store them so that I can easily change the voice with a function.

    But when I try to do Voices.Get(variable) it always returns 0. When I log variable it returns the correct string. If I put this exact string manually in Voices.Get it works flawlessly as well.

    That is the main event page. Voices is the dictionary name by the way.

    This is the function.

    And that is what is safed in the dictionary. Seen in debug mode.

    What am I doing wrong here? I also tried things like Voices.Get(str(variable)), switching the function to async, waits and stuff. :(

    Thanks for helping! :D

  • Doing the same as dop2000.

    Values that are not safed and just for a convenience for me as the developer I use as global variables. So that I can easily see and manage them. Everything that needs to be safed I use a dictionary for.

    Also I like to use json a lot.

    If you know the RPG maker, with JSON you can make things like:

    attacker.atk - defender.def

    And so on.

  • Any ideas?

    Ashley Sorry for tagging you again.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Sorry it was a very busy month for me. I was not able to work extensively on my project.

    Currently I'm somewhat stuck with this problem. I suspect it's an issue with the official facebook plugin.

    When I get this white screen issue solved I can test if the app works like in remote preview on mobile.

  • Okay that is interesting!

    And it looks pretty overcomplicated to convert the array back and forth.

    For now I used sizcoz's suggestion as it's working fine.

    But I'll keep in mind what you explained for the future. Thanks.

  • Ah thanks, I didn't think about that.

    But what do you mean I should learn about arrays? I am using arrays but Construct was holding me back to do so without the use of the inconvenient array object. And I'm also using Jsons.

    But thanks anyway.

  • Hey there!

    Is it possible to access an array inside a global variable?

    For example, if I have a global variable called fruit which's value is ["Apple", "Orange", "Mango", "Banana"], how can I access "Orange"?

    I tried:

    • fruit(1)
    • fruit[1]
    • fruit{1}
    • fruit("1")
    • fruit["1"]
    • fruit{"1"}

    And I think some more. How can I access it? I really do not like the built in Array editor and how I need to copy and paste every single value. And even if I do, the values are cut off and there is no way to adjust the columns widths all at once.

  • You do not have permission to view this post

  • Ashley

    What does the facebook-plugin error mean? Doesn't it work on mobile?

  • Ah thank you! That will be very useful, bookmarked.

  • Hey. I got the debug mode working on my phone now.

    This is the error that I get:

  • Awesome! With your help I was able to think again, read through the documentation again and find a mistake that I did before my holidays. After the holidays I forgot about my changes.

    I chose another database for custom data back then. Because I wanted to have account data and custom data on separate databases for security reasons. Now that I changed it to the default path I was able to read a users custom data with:

    const customData = app.currentUser.customData
    console.log(customData);
    

    And generally read documents:

    const mongodb = app.currentUser.mongoClient("mongodb-atlas");
    const PrivateUserData = mongodb.db("ClientDB").collection("PrivateUserData");
    const myID = app.currentUser.id
    const myData = await PrivateUserData.findOne({ id: myID });
    console.log("My Data: ", myData);

    And to update a document:

    const result = await PrivateUserData.updateOne(
     { id: myID },
     { $set: { dong: "Very schlong" } }
    );
    console.log(result);

    And to update custom user data should be:

    const mongodba = app.services.mongodb("mongodb-atlas");
    const collection = mongodba.db("ServerDB").collection("UserAccounts");
    await collection.updateOne(
     { userID: app.currentUser.id },
     { $set: { dong: "12cm" } }
    );
    

    But I didn't test the last one yet.

  • Hey there!

    Currently I don't know yet if it will have any negative side effects.

    But from my understanding it should have no downsides. But I'm not sure.

    In a couple of days I should be able to test this. I will post an update then.