Home › Forums › General discussions › Create graphical Hotspots from a marco called Object › Reply To: Create graphical Hotspots from a marco called Object
If you need different rotations in each instance, you have to use a different parameter in each. The hotspot uses the parameter belonging to the parent object, not the macro.
A solution for this could be that you pass an array of rotations, and an index telling which one to use from the array for the hotspot.
An example with simpler length editing:
for i = 1 to 2 call "testmacro" parameters x = x, i = i line2 0, 0, x[i], 0 add2 0, 0.1 next i del 2
unID = (i - 1) * 3 + 1 hotspot2 0, 0, unID, x[i], 1 + 128 : unID = unID + 1 hotspot2 x[i], 0, unID, x[i], 2 : unID = unID + 1 hotspot2 -1, 0, unID, x[i], 3 : unID = unID + 1
parameters in both:
x as length array
i as integer
Library Platform, Software Engineer