jhlm87's Forum Posts

  • 4 posts
  • That's true! ok, understood! I think it can solve my problem.

    Thank you very much!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello, sorry for replying late.

    I need for every word in the array, associates it to a few values, ie:

    • "Word 1" => "a1", "a2", "a3", "a4" 4 values
    • "Word 2" => "b6", "b7", "b8" 3 values
    • "Word 3" => "c4", "c5", "d4", "d5", "e4", "e5" 6 values

    ** Notice different number of values for each word

    ...

    ...

    ...

    I will have a checkerboard like this

         a   b   c   d   e   f   g   h   i   j   k   l   m
       -----------------------------------------------------
    1  |   |   |   |   |   |   |   |   |   |   |   |   |   |
       -----------------------------------------------------
    2  |   |   |   |   |   |   |   |   |   |   |   |   |   |
       -----------------------------------------------------
    3  |   |   |   |   |   |   |   |   |   |   |   |   |   |
       -----------------------------------------------------
    4  |   |   |   |   |   |   |   |   |   |   |   |   |   |
       -----------------------------------------------------
    5  |   |   |   |   |   |   |   |   |   |   |   |   |   |
       -----------------------------------------------------
    6  |   |   |   |   |   |   |   |   |   |   |   |   |   |
       -----------------------------------------------------
    7  |   |   |   |   |   |   |   |   |   |   |   |   |   |
       -----------------------------------------------------
    8  |   |   |   |   |   |   |   |   |   |   |   |   |   |
       -----------------------------------------------------
    9  |   |   |   |   |   |   |   |   |   |   |   |   |   |
       -----------------------------------------------------[/code:14egvffj]
     
    | WORD 1| | WORD 2 | | WORD 3 |    |VALIDATE|
    
    What I need to do is when I click a cell and a word, the game says me if the word is in the selected cells or not; for example if I click WORD 1 and I click "a1" cell, it will say is right; if I click WORD 1 and h5 it will say me it is wrong because WORD 1 got only "a1", "a2", "a3", "a4" values
    
    The words and their values will be defined in an external application and stored in a database or a JSON file
    
    Thank you!
  • Sure, it is from a big capx, but I created a new one with only the array issue, I will show

    The json file is built from an ASP.NET/C# application and I need to use this in the C2 project

    Thanks

    [attachment=0:1rl365l9][/attachment:1rl365l9]

  • Hello!

    Im having some troubles with an array I built from a JSON file

    The JSON file is something like this:

    {
    "c2array":true,
    "size":[2,2,1],
    "data":[
      [["Word1"],[
        ["a1"],["a2"],["b1"],["b2"],["c1"],["c2"],["c3"]]],
    
      [["Word2"],[
        ["a1"],["a2"],["b1"],["b2"],["c1"],["c2"],["c3"],["d1"],["d2"],["d3"]]]  
    ]
    }
    [/code:1w6w4gq7]
    
    So I got "Word1" with an array of values "a1","a2" etc...
    
    I turned this JSON file into an array but when I want to show the different values I dont know how to do it.
    If I use Array.at(0) I will get "Word1" value but I need the other values too. If I use Array.At(0,1) I get a 0...
    
    How can I access to the different values in this array inside an array? Thank you very much
  • 4 posts