Array expression IndexOf question

Get help using Construct 2

Post » Mon Jun 15, 2015 4:27 pm

Hello all,

Could anyone suggest a way of using the array expression IndexOf to return the value below (on the Y) a known value?

Or forgetting IndexOf completely, if my array looks like the one below, and I know what the X value is (the object names in this case) - how can I return the Y value below it.

Object A | Object B | Object C
1 | 1 | 1

Thanks,
B
13
S
6
Posts: 130
Reputation: 1,553

Post » Mon Jun 15, 2015 10:51 pm

You know the value of the data in the x yeah?

loop through the array in the x direction until the value you're looking for is found then do Array.At(loopindex, 1)
Nothing goes unanswered!
B
24
S
5
G
1
Posts: 434
Reputation: 3,446

Post » Wed Jun 17, 2015 9:07 am

@briggybros

Thanks for your reply, I ended up doing something very similar - simple- no idea why I was stumped by this at the time! :)
B
13
S
6
Posts: 130
Reputation: 1,553


Return to How do I....?

Who is online

Users browsing this forum: minigame, tannerdler and 8 guests