[SOLVED] Get child index NOT child value with for each child to draw graph

Now i am wondering if its even possible

Anyway this

GraphArray[Index] will return me value of each child
For example i have
Child 0 with value 22
And child 1 with value 5
I will get 22 then 5

What if i wanna get their index number
To get 1st 0 and then 1 and so go on?

I did try GraphArray[Child] but it returns same value

Or is it even possible?

If that’s an array, wouldn’t it be the last variable, Index?

If not, can you post a pic of the variable setup.

This is for arrays and structures.

Variables

Events

Output
Screenshot_20241022_024924_Chrome

Now that i think about it then maybe i wen wrong route for what i want to achieve

What i want to do is draw line from last child to next
Like you see i have 3 child vars there 50 80 and 110
If i set these values to be both starting and end point of line
BUT with exception that start of new line is end of last line
I would get graph

Or am i assuming wrong?
Cause i think what i need is to draw line from (child[index] child value) to (child[index]+1 child value)

Or am i wrong?

My god
Thx i think i get it now

My mistake was CalcButton.X()+GraphArray[Index]
Where it should be CalcButton.X()+Index

And now i can go CalcButton.X()+Index*20 for each index multiply by 20 so i will have 20 pixel gaps

I was overthinking this crap
Thx again

1 Like

It would be your variable [index] and [index+1]

Something like this.

I added the times 20 just to create spacing.

Although a repeat with a variable. Might be just as easy. You would repeat the count minus 1 so it wouldn’t need a condition.

With a repeat.

1 Like

Repeat version would be less performance hungry for huge ass graphs but who would do it anyway

Whatever everything works perfectly fine thx like always

I leave this if someone need it and gonna change topic title

Only one can be enabled at a time
And margin is there to add margin from each edge of bg

And you get this

While this

Results in this

Enabling one of 1st ones and that last one will get you this

Thx Keith again

2 Likes