I'm pretty sure this would apply to Fusion 2.5 also, but I am posting here cause I'm technically using MMF2. I would still be interested in knowing how to do this in Fusion 2.5 also. If you only work with Fusion 2.5, don't be afraid to answer cause I don't want this to go unnoticed simply because it's in the old category.
I can't for the life of me figure out how to do this very simple thing. Neither can ChatGPT (well, it thinks that it can, but keeps screwing up). I believe I will need this kind of functionality often into the future, so it is important that I figure this out.
So the problem is that I don't know how to address a particular instance of an object when there are duplicates. For example, I create a frame and place an active object on it. Now I duplicate this object many times. Now I have many instances of the same object (not to be confused with cloning the object - which actually creates another object in the list). In the events, I want to make it that when I press the left mouse button, I get the X and Y position (or other params) of a random instance of that object. Like picking the object at random and getting its X and Y pos. I am open to circumventing any Fusion limitations using XLua if possible.
In the end, I am trying to make something where when the user clicks, it chooses a random instance of said object to do a particle effect on. So all I need is the X and Y cords of a random instance of this object.
Here are some screenshots of my attempts working with ChatGPT.
Here the counter is NOT being set to each new instance every time you click (as I would expect it to). Apparently Fusion can't address a particular instance of an object when the object being operated on is not the object itself (ie. it's the counter, not the Active).
Please login to see this attachment.
Here it's kinda working, although in a very junky way. Setting the Y pos here is forcing Fusion to bring the particular instance of the object into scope, so now I can finally access it into the counter. This is terrible though and I don't want to change the Y pos, but as soon as I change that line, it doesn't work. I thought I could fool it by just setting it back to itself - nope! How about "+0" - nope! It just has to change it. There has to be a cleaner way to do this. This is all convoluted.
Please login to see this attachment.