get a variable name with an expression

0 favourites
  • 6 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • Hi, is it possible to get the value of a variable whose name was acquired through an expression?


    So basically my npc text is split into 10 npc.row1 npc.row2 and so on text variables.

    I also have a curRow variable that gets +1 every time a button is clicked during npc conversation.

    As a result I have to make 10 sepparate curRow conditions -for each row variable to update the text in the textbox with it's value.

    Is there a better way to do this?

    Basically I want to add another variable called curText. And say


    where the 2 at the end of curRow is the npc.curRow value. Is this possible to do in an expression?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If your goal is to make a system of storing and managing dialogue you might want to check these threads out:

  • i couldnt find a single example of a dialogue system in scirra that is manageable. The complicated examples (dictionary,jason file,etc etc) are all in words and not one capx file to look at. The ones posted lead to dead links :(

    I just want to make an NPC that can be instanced and reused with different text.

  • I would choose the option of giving the npc an array in a container, that way you can set it to different text for each instance.

  • is there no way to just use a bunch of text variables (rows) then?

    I want something that will later be super easy to change on each instance.

    This whole array business sounds like hardcoding dialogue inside the event sheet rather than on the instances.

    My goal is to keep all the dialogue text outside of the event sheet

  • Is it possible to have the dialogue text of npcs in a spreadsheet (csv) and to just load it in NPC instances with a variable.

    There was something mentioned about it at this forum, but no example files anywhere.

    It's really really hard to do the simplest npc dialogue box. This same thing is extremely easy to do in rpg maker engines for example.

    It's an often requested feature and rarely have i seen it implemented well with construct.

    Wouldnt it be great if someone wrote a behavior for construct that mimics the way NPC dialogue is handled in rpg maker?

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