How do I solve this problem?

  • I am trying to have npcs show their own dialogue box when they see the player using "line of sight". So I put out the sprite called "bubble" which is the text box where the text is to be displayed onto a certain npc. Then if the "bubble" is overlapping the npc it will also have it's position set to that specific npc. However, that's where the problem occurs. If there are more than one npc per layout and each one of them have their own "bubble", the "bubbles" won't set their each position to their npc. Instead of that, all "bubbles" are set to just one of the npcs around, giving one of the npcs all of the other np's "bubbles".

    The npcs are all parent to a family called "NPCs". The "bubble" is just one sprite.

    A more short explenation would be. If "bubble" is overlapping "NPCs", set "bubble" position to (NPCs.ImagePointX(0), (NPCs.ImagePointY(0)

    If there is a better solution for this please tell me! Any help is much appreciated!

  • Sir, I believe you need to use families. I just recently learned how through the construct 2 example "families"

    In that example you will see that there is only one sprite for the bullet, with the use of families every bullet will share the same conditions but act individually, this should point you in the right direction.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sir, I believe you need to use families. I just recently learned how through the construct 2 example "families"

    In that example you will see that there is only one sprite for the bullet, with the use of families every bullet will share the same conditions but act individually, this should point you in the right direction.

    Many thanks!

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