Convert 'get Component' of an ImageSprite to a number?

I have several ImageSprites that when touched should send a certain hex digit to my Bluetooth device. I was trying to convert the blocks for each to a generic block. I'm not sure how to use the 'get Component' to identify each ImageSprite.

Replacing blocks like this:

with some further example of this single generic block:

It looks like 'get Component' returns things like:

How would I use that to get a unique and correct hex digit?

I surpose when you press a different imagesprite, a different number is send?

If you have more than 3 buttons, and you want to use any component , you need to make a list of these components, and a list of numbers to send, two lists should be in same order.
When imagesprite pressed, get its index in the imagesprite list, then get the number from number list at same index.

Or you can make a dictionary if want.

Thank gives me a good idea of how to proceed. Thank you!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.