Can't set an Object variable?

Hello,

Coming back to you guys beause I can set an object variable.

Basically I am doing a repeat event x4 to create objects from a group. I have a structure which contains pos_y, pos_y, angle and a text variable (I tried also with a numeric variable - didn’t work either) that is supposed to be an identificator. Purpose is then to capture a “button pressed” on the group by retrieving this ID, to target the object of the group that was clicked and do adequate action.

In the loop position and angle are going well BUT in the debugger whatever I do my object variable isn’t set whereas I am using exactly the same method.

Please see screen capture.

If anyone can help it will be appreciated !

Thanks very much!

Alexandre

events_fleche

Replying to myself…

Here my problem (which I still don’t understand) is that my scene variable Variable(FlecheSwitchPlateaux[ToString(Variable(Counter))].name) isn’t read whereas Variable(FlecheSwitchPlateaux[ToString(Variable(Counter))].pos_x) is read. ??? This lets me stuned.

BUT, to avoid this shortcoming easiest way I found is to use the Counter directly.

Hope this will help someone.

Alexandre

1 Like

you needed a text variable action because TL is a string.
image