odiusfly's Recent Forum Activity

  • alextro Yes exactly. Any idea, how solve it?

    R0J0hound post this before:

    A:for each x
    — compare: A.at(A.curX)=B.at(A.curX)
    — — c: set at (a.curX) to 1
    — else
    — A: contains value B.at(A.curX)
    — — c: set at (a.curX) to 2
    — else
    — — c: set at (a.curX) to 3

    and works perfect so far, but alextro if you have different way, it's ok!

    Ok R0J0hound , thanks again for your time!

  • R0J0hound

    Your example is great, but i want to ask you, how we can control the duplicates?

    A=[ “a”, “b”, “c” ]

    B=[ “b”, “b”, “a” ]

    To give:

    C=[ 3, 1, 2 ]

    Basicaly the point is as priority to check the same position if exist and give the value 1.

    Example1:

    A=[ “a”, “b”, “b”, “c” ]

    B=[ “b”, “b”, “d”, “b” ]

    To give:

    C=[ 2, 1, 3, 3 ]

    Example2:

    A=[ “a”, “b”, “b”, “c” ]

    B=[ “b”, “b”, “b”, “b” ]

    To give:

    C=[ 3, 1, 1, 3 ]

    Thanks again!!!

  • 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: contactsgj@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!

odiusfly's avatar

odiusfly

Member since 15 Jul, 2014

Twitter
odiusfly has 6 followers

Connect with odiusfly

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies