How do I get instances of text to behave independently ?

0 favourites
  • 6 posts
From the Asset Store
Change delay, create new lines, "backspace" the text
  • Hello,

    I have a game that I am developing, the problem is that the spawned instances of the text are not responding individually to collision events with a ball. Once one text changes, all the other texts on other blocks changes to the same value. How do I correct this? see attached images.

    Thanks,

    KS

    Tagged:

  • Depends how you are making it but the text should relate to the block in some way. You are using ball on collision with block set text? You can put the variables for hp on one of the objects, i prefer block, and have the block and text in a container so they relate to each other.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Something like: Ball - On collision with block - pick text nearest to ball - set text to XYZ should work

  • Depends how you are making it but the text should relate to the block in some way. You are using ball on collision with block set text? You can put the variables for hp on one of the objects, i prefer block, and have the block and text in a container so they relate to each other.

    I am using Block on collision with ball, subtract 1 from an instance variable and set the text to that variable. I will read up on the use of containers.

  • Something like: Ball - On collision with block - pick text nearest to ball - set text to XYZ should work

    Hello, Yes but I can not find the pick text nearest to the ball option. Where can I find it please?

  • The pick nearest/furthest condition is found in the size & position section of the object you are trying to pick. That being said, using containers like suggested is a much better solution. If you add the text into a container on the block object, the current method you are using should work as the block is picked by the collision and then when you reference the text it will automatically pick the instance that is in the container with that block.

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