Sofa_King's Recent Forum Activity

  • Have you completed the Beginner's Guide tutorial? It doesnt deal with swords, but I think it would give you a good starting point.

  • This is an issue for me as well. Is there a reason why C3 caps out at 144? It seems arbitrary to me and an easy thing to fix.

  • Mikal That C3P! Thanks. It was helpful to see it in action.

    mekonbekon Thank you, for breaking it down step-by-step.

    I think I understand the logic behind this method. I have tried to implement what you guys have been saying, but I keep ending up with errors. So I think it's probably stemming from somewhere outside the randomization logic.

    I. Give. Up. I cant keep trying to do this because its killing my drive to actually get the work done. At some point down the line, i'm going to revisit this thread and figure it out, but for now, i'm going to stick to the following idea based on what AllanR said.

    AllanR Dude, your right about it already being randomized. I took that a little further and just made a simple 'random 0-3' variable and that seemed to be enough to randomize the text values that I was pulling.

    For some reason the animation frame selection is still not syncing up correctly and I have no idea why not. In the screen capture, you can see the I have disabled the first two lines of code. This code just pulls the info from the 0 Y-axis. The frustrating thing is that this works perfectly every time, but the randomized Y-axis code doesn't work (it works for the text values, but the frame selection is fucked).

    My image sprites are 19 animation frames, named 0, 1, 2, 3 ..., 19, which correspond to the IELTS_Array which is also 0 to 19.

    Anyways my friends, thank you so much for walking me through this step by step! I will 100% revisit this thread in the future. I really appreciate the time you guys took to help me. It's unfortunate that I wasn't able to implement it, but I will at some point.

  • AllanR I really appreciate the time you took to write that! I understood most of what you said, but I am still struggling to implement Mikal 's code or the code in the aforementioned tutorial. I feel like you both gave great information, but no matter what I try to do, I keep getting 0, NaN, or text values from other locations in the first array.

    I decided to try my own code that (in my head) should work. Perhaps you could stake a look and identify why its not working? Keep in mind that I am trying to pull the Y values from (0 to 3) in the 'Working_Answers_Array's Y axis, and randomly place them into 'Working_Answers_Array_Shuffled' at random random Y value locations. I then will pull these text values from 'Working_Array_Shuffled' and use them to set the in-game text.

    Why doesn't this work!??! It works in my head... :(

  • Shuffle array function below. Uses new 'beta' function feature, but should be easy to translate to older function or just plain events.

    Thank you for your reply. I imitated your event sheet as close as possible, but it gave me some pretty serious errors (0 in some places, and jumbled data in other places).

    If you have the time, could you explain how this works? I cant 't understand what it is supposed to be doing.

    a

    - Why are you subtracting one from the width in the first system event? ("from 0 to Array.Width-1")

    - Why are you subtracting the LoopIndex from the Array.Width in the 'set RandomIndex' action?

    - How does this lead to a shuffled array?

    - Will it work with text values in the array?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've been struggling with this for a couple days now. I know there are posts and tutorials on this, but I cant seem to wrap my head around them.

    Like this one https://www.construct.net/en/tutorials/simple-array-shuffle-371

    Anyway, this is what i'm trying to do:

    I have a game set up where it is pulling multiple choice answers from an array. It's pulling the answers from a semi-permanent array (which has 20 options) and pasting the chosen four multiple choice answers into a temporary array. I need to then shuffle these answers and then set those values into text boxes.

    You can see the bulk of this operation in the screen shot below:

    And this is where i'm trying to quickly shuffle the temporary array (based on what I saw in the tutorial posted above), but my brain is dying at this point. I'm plan to finally pull the text in the x column and use that for the 'answer_text'.

  • graham-s Super smart! Thank you.

  • WackyToaster Thank you so much foe that! It solved the array pulling problem. And I will test out the randomization idea very soon, but I think that it might be prudent to ask the following question first, because it will probably effect the way in which I randomize the answer selection:

    How can I make sure that one of the answers matches the variable/name/slide of the presented card?

    Right now I have one sprite that contains all of the cards, organized into three animations (one for each type), with five frames (one for each card). This matches the array that you can see in the picture.

    Thank you for your help so far!

  • Boring title, I know.

    Really I have two issues here that I can't wrap my head around:

    1. Pulling text data from an array and pasting it into textboxes.

    This is my eventsheet and the array, but it is just giving me "0"s:

    2. Randomizing this data in a non-repeating fashion.

    This eventsheet works in my head, but not in reality (I know it's not pulling from the array yet, but since I was struggling with the array, I was just trying to get non-random numbers first):

    Thanks for your time! Please let me know if this message is not clear.

  • Ashley> Can't reproduce in r124. Assuming you're testing with r120, closing as already fixed.

    You're right. I just checked am i'm running 'r120 stable'. Thanks for clearing that up for me. I'll be looking forward to seeing the update then! :D

    It's probably a bug that is specific to my hardware/software set up or something. Either way, Ashley has apparently already caught the bug that I was running into. Thank you for checking though!

    Have a great day you two! Happy gaming.

  • Ashley Hi Ashley, I posted my problem on the github page. I dont know if this is just a result of me being a super n00b or if its a hidden issue in C3 (probably the former not the latter).

    Anyway, https://github.com/Scirra/Construct-3-bugs/issues/2267.

Sofa_King's avatar

Sofa_King

Member since 12 Sep, 2018

Twitter
Sofa_King has 4 followers

Trophy Case

  • 6-Year Club
  • Email Verified

Progress

7/44
How to earn trophies