Hi there, long time since i posted around the forums. I searched the forum but couldn't find a result cause i don't know how to call this expression, that is in Construct but never understood what does it do.
The expression in question is this:
object(object.anything).x
the (object.anything) what does it do? identify a certain object? or what is it for?
im using it as a object identifier of the same type for example:
i have 5 buttons... all the same sprite just different instances.
from left to right i assigned a 0 to 4 id to them as i create them in a loop at a start-up to perfectly align them.
but as u press the button the buttons increase in width to "simulate" it's selected.
and decrease in width to original width to show that is not selected.
now i need to calculate the distance from the first to last button in order to perfectly align the object in center based on the gap between those buttons.
im calculating the distance as distance(button(button.id=0).bboxright,0,button(button.id=4).bboxleft,0)
this if the expression between the parenthesis is working as im thinking at as a identifier between objects of the same type. then it should give me the exact distance between first and last object. but ...it's short by 20% or so...
i realize the problem is with me no understanding properly what the (object.anything) expression is for... anyone can explain to me what this thing does? i think i asked before but i forgot was a long time ago 2-4 years ago maybe. Thank you in advanced.
P.S im looking through the manual to see if i can find it... so far no luck.
P.P.S i solved my issue another way... but i still don't know what this expression does. If anyone can answer would help a lot.