get image point name by index

  • Hi I have a sprite with about 20 image points and each has a specific name. I know which image point i want by index, is there any way to get the image point name given the index ?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • No, but what do you need the name for if you know the index?

  • I have a large sprite with many image points on them, (about 40). Each image point has a name that tells me what the image is about. Another small sprite moves around it randomly an stops at a specific time. Then i loop through the image points using distance() to find the closest one. All this works well and I get the index to the image point but I have no way to get the image name.

    I can work around it by storing all the names in an array and looking them up once I have the image point index.

    It would be a useful to be able to get sprite1.imagepointname(loopindex) the same way we can get the sprite1.imagepointx(loopindex) as it would save keeping another array in sync with the image points.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)