VikasSanstha's Forum Posts

  • Hello friends,

    I have honestly worked very hard and learned a lot since first starting with Construct a few months ago, but this kind of quiz mechanic is something I just don't know how to do. I wouldn't normally post asking how to do something from the ground up like this.

    I'm a teacher in India, and I'm making all educational content. I am extremely motivated to learn how to achieve the functionality below, the basic concepts of which I can then adapt and apply to a wide variety of content:

    dropbox.com/s/me7mgmaedcg5ow9/basicAudioQuiz.c3p

    1. A random audio file is played from a group of related files.
    2. There is a matching set of images that share all the same file prefixes as the audio files.
    3. Three possible answer matches are generated from these image files, with one of course being correct. They are randomized.

    I can do the other parts to turn it into an engaging game, but I just don't understand the logic required to make the main mechanic work properly. The use scenario I am posting in the project file above is to teach basic Hindi consonants. The project file includes a set of audio files and matching images.

    I would greatly appreciate any help. Thanks.

    Tagged:

  • Hello friends,

    If I have five audio files under Sounds, called a,b,c,d and e.webm, and I play them at random using choose

    on timer>play (by name)>choose("a","b","c","d","e")

    Is it possible to then store in a variable the name of the audio file that is then played?

    Many thanks

    Tagged:

  • Hello friends,

    I have made a simple matching game with a target image and a grid of six images (I'm calling them "spawn images") that you have to pick from to match the target (by animation frame comparison).

    The target and spawn images have a lot of animation frames, and therefore there are a lot of non-matches since the grid has only six images (it's for small children). I'd like to use a timer or another method to periodically change to a different range of frames for both the target and spawned images, thereby limiting the number of images used and creating more matches.

    The spawned images are randomized, and the target image goes in a sequential loop, but the frames are indentical for both. I don't want to split the images into separate animations, just to use a range of the available frames.

    I'd prefer to state it in terms of a percent of all frames, since I will add/subtract content over time. I also have several different categories (animations) of images, each animation with a different number of frames, so a percentage is much better.

    Basic use scenario is:

    1. User chooses animals category. The animals animation has 40 frames.

    2. The first 25% of frames are employed initially.

    3. After 20 seconds (or whatever, determined by a timer), the next 25% are used

    4. etc. up to 100%, and then cycle.

    Any help is greatly appreciated. Thank you.

  • It doesn't seem as though it's directly possible. Are we meant to just do it like this?

  • Thanks for the reply! Sorry you couldn't download it. I thought I stripped out all 3rd party elements, not sure what else the problem might be. I will try to implement your advice. I'm not sure if the reverse part is reflected in your code sample. I wouldn't necessarily know how to do that otherwise, but I will work with it in any case. Thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post

  • Yes, I want to run through the values, compare them to len, and use only certain ones, but I have not been able to figure out how to make this work in my project. I only want to have one list. Many thanks for any assistance.

  • Thanks for the reply.

    I only want to have one list. There is one list with hundreds of words, and I would like to have settings for 3 letters, 4 letters, 5 letters, etc. up to 10 letters eventually, so using separate lists would be very inefficient and time-consuming and complicated for me to manage. Plus the default state of the game is to draw entries from the entire list, utilizing all lengths of words.

    Is it not possible to filter an array based on character count, using len or some other method? If so, I will abandon this idea.

    If this kind of filtering is possible, it opens many possibilities for me, like presenting only the words that begin with a certain letter. It's also relevant to many other educational activities that I've been creating, so I'm very keen to understand how array filtering works, if it is possible. Thanks.

  • Hello friends,

    I have a spelling game where the words are being drawn from an array, and the words vary in length from 3-8 characters. I would like to create two different modes - normal and easy, based on character counts - without creating two separate projects or arrays.

    dropbox.com/s/5bbsm5gveebmm0a/spell.c3p

    I stripped out the pictures just to make it smaller. I've included a text box with the target word for testing purposes.

    I am imagining that I could invoke a mode using a variable, that reloads the array and filters entries based on character length. I would like to have a "normal" mode that uses all entries, and an easy mode that uses only entries up to 4 characters long. I would provide the user with a couple icons for normal and easy, and they could switch between the two modes. It would just invoke the filtering.

    I would much prefer to stay with the same one array for both modes, filtering the same contents rather than creating additional arrays.

    I tried to set a len condition, but I don't understand how to tell the system to only use array entries that fit a certain criteria.

    Currently the letter blocks are baked into the layout. I would much prefer if the blocks were created dynamically, the same way that the slots are. Ideally there would be two options for how to handle it, either backend options for me for how to configure things for export, and/or user-selectable options during game play:

    1) The number of letter blocks matches the character count of the target word, and...

    2) I explicitly declare the number of letter blocks

    I have now spent more than six hours trying to do only this, without success. I know how to make the boxes and do the offset, but the resulting boxes don't get tied into the rest of the mechanic properly.

    Thanks very much for any guidance. Much appreciated.

  • I was able to get the picture version working myself. Thanks again!

  • Thanks so much! I am very grateful for your generosity.

  • Hello friends,

    I have this spell-the-word game that I purchased from Envato. I have customized it quite a bit, changing the appearance and some functionality, and adding other functionality.

    It was originally made using two text files for the questions and answers. I would much prefer to use an array, and I wanted to conquer the challenge of converting it to an array to learn from it. Many hours and versions later my attempts have been fruitless, so I would greatly appreciate some help.

    My array is already in place, and I have it working fine using the first question and answer, but no advancing. It does advance fine, but since I explicitly declared the question/answer (array.at with an index number instead of variables), it just repeats.

    I would also really like ability to use an image file in place of a text question - a separate version, not both functionalities in one. I envision a column in my array with the name of the image file to be used, matched to the answer. Then I put those images under "files". There would be no text questions. This would be extremely helpful if anyone could help. The version I've uploaded here, using sentences, is good for children who can read, but I really want to have another version where there is just a simple visual cue - e.g. a picture of a dog, and the student has to spell dog.

    Thanks again!

    Here is the project file. I have added all the groups and comments, so they may not be 100% accurate.

    dropbox.com/s/0deftpe1gvuyln0/Speller%20v7.c3p

  • First thing, don't call randomize after a wait action on start of layout. Move it to event 2 instead, as you have no way of knowing for certain if the Ajax request will complete in .0001 seconds or 10 seconds.

    What is your default array size? From what I can see, your randomize loop will delete all your array x indexes after being run once. The second time, the loop will run for 0 to -1, since your array width will be 0 by then.

    Thanks, it's x=5. now I understand, I'm deleting everything from the array, so if I want to refresh it with the same content, I will need to recreate that content first, right? Make a sub-function that repopulated the array?

    That's not what I really want to do in any case. I will just move on to the next y row after the user has satisfied some requirement.

  • I have it working fine when the function is called at startup, but it doesn't work when triggered by a button click. I don't understand. Thanks for any assistance.

    dropbox.com/s/oqdj6m2xjlf0zti/random.c3p

    I would also really like to put each letter into it's own text box, but I have failed miserably in my attempts to do this. Any guidance would be appreciated.

  • Thanks to both of you for the help. I think I can run with this. Very much appreciated!