How do I set text to array based on variable?

0 favourites
  • 4 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • I have a parameter called speaker

    I want to set my text to <speaker>dialog.at(x,y,z)

    I have multiple speakers,

    so i have multiple arrays

    Bobdialog

    Sallydialog

    saradialog

    you get the idea.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Add all arrays to a family, create an instance variable, say, Owner. Then you will be able to pick ArrayFamily by comparing Owner=Speaker. And then set text to ArrayFamily.At(....)

    Another option is to use a single Dialog array object with multiple instances. Just like you have multiple sprite instance, you can create multiple array instances. Then use the same trick of picking the right instance by comparing the instance variable.

  • Another option is to use a single Dialog array object with multiple instances. Just like you have multiple sprite instance, you can create multiple array instances. Then use the same trick of picking the right instance by comparing the instance variable.

    I would then need 4 axis, something construct doesnt support

    1. For dialog (the entire conversation)

    2. For current dialog (the part it is upto)

    3. For language

    4. For owner

    Also that was more original plan back when I had 1 and 2 as the same thing, however I figured it would be easier to organize this way.

  • No, use an instance variable for the Owner.

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