bociakrodyl's Recent Forum Activity

  • Hi!

    I created a function that plays a sound file (recorded speech) and mutes a little the other sound files (background music).

    Depending on the action, I need to run certain dialogues composed of different speech files.

    So I would like to be able to play individual recordings with speech one by one in any order and with any breaks.

    I have this code, but the second function call with the "swe0" does not work.

    Could someone guide me or suggest something?

  • To utilize "on speech ended" then, your approach has to be changed in a certain way.

    oh! And could you please guide me how to do it? Any hint?

    In my game in large part, I rely on the speech synthesis and various types of sounds. Therefore, a good understanding of what and how I can do with audio and speech in Construct is the basis for me.

  • Thanks!

    Yes, I wanted to use "on speech ended" before, but this condition is strange. Very very :-) It does not want to be added to the function. On my screenshot you can see where I can put this. Now it is turned off.

    Solution I find is to make a loop based on the function with own counter. And it works fine :-)

    Anyway, huge big great mega thanks to you both: Colonel Justice and Plinkie!

    I would not have a working mechanism without your help.

  • Thanks! But this arrangement does not work properly.

    It reads all phrases, but does not take any breaks.

    Does your Construct do pauses in this order of action?

  • I had r148 stable, now I ran r154 beta.

    Unfortunately, no matter where I place this new action, the effect is unchanged.

    drive.google.com/open

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks!

    But where will I find such an action?

    For me, there is no such thing in Construct.

    please see:

  • Thanks! I have removed the characters "" and now it is working with the appropriate intervals.

    This is great! But something with this speech synthesis is very strange.

    It speaks only the first sentence by X times.

    If I move the wait action below the speech synthesis, then it reads all the sentences, but does not keep the "wait" pauses.

    It looks like there will be either good breaks or good text :-D

    drive.google.com/open

  • I agree that LoopIndex is a good idea. Thanks!

    But for me it's strange, because I have had the counter.

    So I change the one counter to another form of counting,

    but the counter remains a counter :-)

    Earlier, during getting to know Construct, I found information on how to use "wait" in the loop.

    construct.net/en/tutorials/using-wait-in-loops-454

    So I put together the actions and the effect is:

    - The system says 3 times only the first sentence, it looks like LoopIndex did not work

    - "wait" is not run

    A very strange thing, because the logic looks OK. Maybe Construct needs something else?

    attach the file

    drive.google.com/open

  • Thanks! It's almost perfect :)

    1. I take the ID of the object with which the player has a collision.

    2. I have counted the number of elements kept in the instant variable called short_desc.

    3. I start reading the first text and here's the problem.

    The system reads the text from the first quotes without interruption as many times as there are counted items.

    So the system is not waiting.

    Besides, it does not take any more texts.

    What am I doing wrong here? I am asking for a hint.

    drive.google.com/open

  • You're trying to pass an array object through a function?

    Yes Plinkie, I'm trying!

    but Yoda said there is no try ;-)))

    and more seriously writing I would like to know how to do it. I will probably use this in several places of my code.

    However, the second and most important thing is to call a function with a parameter.

    In this parameter I will pass the selected Instant Variables of the selected object.

    For example, this ugly piece is trying to get this parameter works:

    room.UID(11).short_desc

    where short_desc is instant variable of object room with UID 11.

  • Thanks thanks thanks!

    This is a very big thank you, because I am very grateful for any help.

    I have learned a lot already, but I still meet the high walls, which I hope someone will show me how to beat.

    I could not test it, I was stuck on picking up the array as a parameter.

    First, I will describe the case with the array, but it seems to me that a better solution will be if I store data in instant variables.

    1. Array as parameter

    I want to call the speakArrWithDucking function and give my array as a parameter.

    At this point, Construct displays:

    '11_full_desc' needs an expression after it.

    This is an object name so you need a dot and an expression name after it.

    I looked through the possibilities following the dot, but I found nothing suitable.

    You wrote:

    The term array is a bit misleading since you are using a function string parameter.

    But I would like something other than a string as parameter, more specifically, I would like an object :-)

    But the object can not be selected while creating a function parameter.

    I chose the String because there is also Number and Boolean to choose from the list. So it seemed reasonable for me.

    2. Instant Variables

    I thought that a simpler solution would be to pass a string of texts and numbers in the Instance Variables.

    The reason for such thinking is the fact the array is more work when it comes to filling them on start the game.

    So I created an instance variable called short_desc.

    There, I put the test data.

    But after many combinations, I did not find out how to refer to this by calling the function.

    There is very little information about the Instance Variables in the documentation:

    construct.net/en/make-games/manuals/construct-3/project-primitives/objects/instance-variables

    I tried, among others, like this:

    object.its-UID.instant-variable

    room.UID=11(short_desc)

    room.UID(11).short_desc

    but nothing works, can I ask for a suggestion?

    Maybe there is some documentation about these types of queries?

  • I made the function: speakArrWithDucking.

    The function has one parameter: arrToSpeak.

    In this parameter I want to pass the array.

    My array will be built with text and number pairs one after another:

    "text 1", value in seconds, "text 2", another value in seconds, etc.

    In the function I will use a speech synthesis for the text, then wait for the number of seconds and so until the end of the array.

    To determine the array size I want to use:

    parametr.Width

    because I found a description in the documentation Width: Return the size of each of the array's dimensions.

    But the system does not accept such a command. I have a message: Not an object.

    Is there any way that I can specify the length of the array in the parameter?

bociakrodyl's avatar

bociakrodyl

Member since 13 Feb, 2016

None one is following bociakrodyl yet!

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies