I have one object titled "bar"
I have five instances of the "bar" object in my game
When I click on instance 1 of "bar" I want action set 1 to fire
When I click on instance 2 of "bar" I want action set 2 to fire
When I click on instance 3 of "bar" I want action set 3 to fire
Why is this so complicated? So many questions regarding this, but no simple or clear answers. Certainly not trying to be critical (as Construct Rocks!), but this seems to be as fundamental of a expectation as any. Can I name my instances? And then simply identify or call them via onMouseClicked --> "instance name 1" --> perform actions?
Perhaps this is one of the "would like to have features?"
Please help - Thank you graciously in advance.
Develop games in your browser. Powerful, performant & highly capable.
The best solution would be to add an instance variable ID to the Bar sprite and set it to 1,2,3,4,5 for your five instances.
Then you can change your event to:
Mouse on clicked Bar
Bar ID = 1 -> set fire to 1
Bar ID = 2 -> set fire to 2
Bar ID = 3 -> set fire to 3
Or even easier:
Mouse on clicked Bar -> set fire to Bar.ID
You can also use UIDs or IIDs