odiusfly's Forum Posts

  • lionz please check my previous messages.

    "H" it's nothing to do with the result. "H" is on array1, is default values.

    Array1 is just a default values -> Question

    "E" exist on "array2" and "array1" but we detect always the values from array2 and their positions.

    If you check my latest latest post, check the examples i have. I'm not saying anything about "H" value. Let's write you again to be more simplest to you:

    Array1

    H

    E

    Array2

    E

    L

    This means:

    First value from Array2 is "E" so we give 2.

    Second value is "L" so we give 3. I give 3 not for "E" (Array1).

    Always check Array2. So in Array2 is "L" letter.

    I hope make sense now.

    Again, sorry for all this situation, maybe i needed to share more examples to be simplest.

    By the way thanks again!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for your reply R0J0hound , i will check it!!! :)

  • Ok, to be more simplest. Let's forget (just example to explain you) the second value after comma. So let's imagine we have 3 arrays.

    Array1 = Question

    Array2 = Answer

    Array3 = Result

    So, Array1 values start from 0 - Array1.width

    This means, we start to detect from Array2:

    Array2(0) -> Start detect each value to all position of Array1.

    So from my latest example, Array1 have "E" to 1 position.

    And our answer (Array2) "Ε" was in 0 position of Array2.

    What means?

    Array3 (or Array 1 after comma, whatever) will give us result: 2

    I hope make sense now! If you check all my previous examples is exactly the same thing i try to explain all the time. Sorry for the misunderstanding.

    And some fast examples:

    Array1 => YES

    Array2 => YES

    Array3 => 111

    Array1 => YES

    Array2 => YSE

    Array3 => 122

    Array1 => YES

    Array2 => NES

    Array3 => 311

    Array1 => YES

    Array2 => ABC

    Array3 => 333

  • No, it's exactly with all examples i post until now.

  • No, the "H" it's nothing to do with the result.

    To understand more:

    "Array1" = Question

    "Array2" = Answer

    So "Array1" after comma is our final result.

    From my latest example in the first position we write "E" so from the Array1 need to check from 0-Array1.width... if "E" exist or not.

    Ok, i will try to check it in deep your example. Thanks again for your help! :)

  • It's much better but still something is missing... :)

    I understand what you have done, but basically it's a bit different.

    So, from this example:

    Array1:

    H,3

    E,2

    L,1

    L,1

    O,3

    Array2:

    E

    L

    L

    L

    L

    It's ok as you detect the duplicates but the correct result need to be:

    Array1:

    H,2

    E,3

    L,1

    L,1

    O,3

    Because second values (Array1), after comma, is what we read from Array2. So, this means, "E" exist but in Array1 is on second position (Array1).

    I understand, you try to detect based on Array1, but the order need to be based on Array2 and give us the result.

    I hope make sense. But so far, you give me a lot help, i appreciate it. If this works better from your side, as paid work, let me know and contact me please via email: contactxku@odiusfly.com to discuss more.

    Thanks!

  • Ok no problem. Ok, let's explain better:

    About order, always will start from 0 -> End of array

    So, as you know the values are:

    1 = same position

    2 = different positon

    3 = not exist

    Array1 = HELLO

    Array2 = HLEEO

    What means? From the result start from 0 to 4 (array width). As we already detect 1 L to array2

    when continue with the next step, the second L will not detect it in array2 because already checked before.

    Make sense?

    Another example:

    Array1 = HELLO

    Array2 = EEEEE

    This means:

    3,1,3,3,3

    As we detect same position and this we need to keep.

    I hope make sense now. Thanks again! :)

  • So basically, 1) all depend/starting with the unique values and 2) The order.

    Again, thanks a lot for your help, i appreciate it!!!

  • lionz first of all thank you very much!!!

    I check the file, it works almost perfect!

    There is only 1 issue.

    Do you know what missing below to this example:

    Array1

    H

    E

    L

    L

    O

    Array2

    H

    L

    E

    E

    O

    So, with your file the result is this:

    H,1

    E,2

    L,2

    L,2

    O,1

    But the problem here that the result needed to be:

    H,1

    E,2

    L,2

    L,3

    0,1

  • lionz

    Is this easy and fast for you to share a source file? Thanks!

  • Hi, i'm still looking for a solution, any help? Thanks! :)

  • Ok, thanks i will give a try!

  • Another example:

    Array1

    0=> A,2

    1=> B,2

    2=> C,1

    3=> D,1

    Array2

    0=> B

    1=> A

    2=> C

    3=> D

    2 = Value exist in different position.

    I hope make sense! :)

  • Yes example will work better, to see the result.

    But in the meantime i will try it myself.

    Thanks again guys! :)

    Also please note again:

    Array 1 gives me this example:

    0 = A,1

    1 = B,2

    3 = C,2

    4 = D,3

    And if you noted, in array2 below i use in position 4 same letter as position 1. But as result, array1 give me: 4 = D,3 (3 = value not exist)

    0 = A

    1 = C

    3 = B

    4 = C

    * Of course letter "C" exist twice in array 2, but in array 1 we need it only 1. So array find first if the value = same position, otherwise find if exist to somewhere else or not exist.

    In theory make sense, but i try to find a best solution.

  • Hi, thanks for your reply!

    I know this part, but i'm stuck as i'm not looking just to compare values.

    1 = Value exist in the same position for both arrays

    2 = Value exist in different position

    3 = Value not exist at all

    Basically part 2 it's the complex part i have stuck.

    By the way thanks for your time!