mnmco's Forum Posts

  • thank you blackhornet and everyone for the help

  • by pressing the sprite ... it will randomly play an audio under the specific sound folder A=NO , B=YES

  • Thank you for helping but I think I messed up I tried to add &int(random(min,max)) but Its not playing audios.

  • >

    > > Yeah you are mixing up things.

    > >

    > > If you look in my Capx I use a functionality that allow you to extract the text at a given index. This index goes from 0 to the number of items In the list. So you don't need a global variable its already being taken care of by the list internal index.

    > >

    >

    > In your capx, Is it possible that the number text and the name text will appear separately. Random Number at the top then the Name at the bottom..

    >

    Yeah you would have to modify it a little, but you can get the index number of a selected name as well or you could store the random index number in a local variable first which you then use to get the name as well as the number you want to place in the separate textbox.

    I appreciate your tips and the effort to reply but I hope if its ok with you that you can modify my capx a little. I find it hard to find ways. even using arrays, etc. But I will try to do it .. thanks..

  • Yeah you are mixing up things.

    If you look in my Capx I use a functionality that allow you to extract the text at a given index. This index goes from 0 to the number of items In the list. So you don't need a global variable its already being taken care of by the list internal index.

    In your capx, Is it possible that the number text and the name text will appear separately. Random Number at the top then the Name at the bottom..

  • You should be using an Array. That is your missing link. You can make this list work using List.IndexOf, etc. But an Array object has more functionality.

    Thank you for the advice but Im not really good in coding. Can you give me sample capx using arrays? Thank you ..

  • >

    > IS THIS POSSIBLE HERE IN C2? HOW? I MADE A RANDOM NUMBER CAPX BUT I FIND IT HARD TO THIS FLOW.. I HOPE YOU CAN HELP WITH A CAPX. THANKS.

    >

    You can do it in several ways, either with a list, array, dictionary or from a file etc.

    To do it with a list (Which is the easiest to explain I think), you can use "Add to list" and then insert a String. The list will automatically give each item an index, starting at index 0.

    0: James

    1: Robert

    2: Jack

    3: ... so on

    The String you insert could come from a Textbox and you can retrieve the name from the list at an given index using get "ItemTextAt" and you can change the index that you want to get with an "Int(Random(List.Itemcount))" to make it choose a random index from the list.

    Here is an example:

    https://dl.dropboxusercontent.com/u/109921357/Add%20and%20get%20names/Add_and_get_names.capx

    First of all, Thank you for the reply and sample capx. But I hope you can help me as I got lost as Im doing my codes in the events.

    Im using a global variable for the random number and I find it hard to connect the random number and the list .. is this possible or my coding is just complicated? or maybe there is much more simple logic than what im doing? Thanks again for the future help..

    https://www.dropbox.com/s/adjeivnm7xdph ... .capx?dl=0

  • Thank you for the reply pls help me as I am lost with my events.. as seen below..

  • IS THIS POSSIBLE HERE IN C2? HOW? I MADE A RANDOM NUMBER CAPX BUT I FIND IT HARD TO THIS FLOW.. I HOPE YOU CAN HELP WITH A CAPX. THANKS.

  • Just copy the action at event 8.

    funny.. the code im trying to search is just within my code .. damn .. anyways, so with multiple functions I will just add them 1 by 1? any shortcut perhaps? thank u for the quick reply...

  • anyone? please HELP!

    tnx..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have only one trigger that alternately plays multiple audios. Is there a way I can repeat the last audio played?

  • Like this?

    key 1 is down

    key 2 is down

    trigger once

    --- play sound

    thank you ... cheers

  • 21 isn't a key code for anything. Lookup "javascript keycode" on google to get a list of keycodes for the different key. Like this one:

    http://www.javascripter.net/faq/keycodes.htm

    Numpad 1's key code looks to be 97 if numlock is on.

    Ooops... now I know, but is it possible to combine two Numpad keys? If i press 21 = audio is played. Is it possible? tnx..