How do I pick Array.X(0) based on the Array.current values [Easy Question]?

0 favourites
  • 4 posts
From the Asset Store
Pick Up Items Sound effects for your game, Take them for a ride right now and you will worry no more.
  • Hello guys, very easy question for ya all, Im running a Array For Each XY loop here's my buggy code:

    + System: On signal "chestclose"

    ----+ Array: For each XY element

    --------+ Array: Current value = Parentname

    ---------> Text2: Set text to Array.CurValue

    ---------> System: Stop loop

    What i want is If the array current value = parent name , then get that parent name's X and return that column's O index this is my table :

    fire none 3

    water none 3

    grass none 3

    earth grasswater 6

    cloud waterfire 6

    smoke grassfire 6

    For example if the parent is grasswater, then it should return earth etc.

    This is easy for you guys, I know it hehe

    Tagged:

  • set text to array.at(array.curx,0)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Wow thank you very much! I tried it and it returns "None" , I experimented a bit and i tried this : Array.At(0,Array.CurY) It now returns "Earth" , Thank you very much!!!

  • Yes makes sense, you are using rows/columns in a reverse manner to how I do it but still has the same result.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)