A question on a variable and text.

0 favourites
  • 3 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • I created object 1, I created a digital variable with it.

    When a given object 1 collides with another object 2, then the variable at object 1 plus the number 1 (ie one collision) and so on, with each collision of object 1 with another object, it plus 1.

    If object 1 collides 10 times with object 2, then its variable will be equal to 10.

    Now the question.

    If I simultaneously create 2 copies of object 1, then when I collide with any object 2 of any copy 1, both copies of 1 have a plus. That is, if one copy 1 is in the other side and the other copy of object 1 collides with object 2, then two copies of object 1 are plus variables.

    For each object when it is created, I create text to see the change in the variable. Perhaps the problem is that the text changes regardless of which object intersects.

    How then to display different text using one text object?

    That is, I create 2 copies of object 1 and 2 copies of text are created to them that display the values ​​of the variable.

    Subscribe to Construct videos now
  • You can put the text object in a container with the sprite object. When you pick one, the associated text object will also be picked.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It can be seen for the first time I did something wrong with the cannon and it did not work.

    But once again, after you wrote, I did everything and it helped! Huge thanks!

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