Using the & in expressions

  • Hi,

    This might be a quite simple question but I just couldn't get this to work right.

    I have 2 variables, one contains "testobject" and the other contains a number.

    What I'm trying to do is this:

    <img src="http://i.imgur.com/Ecod6.png" border="0" />

    So I can tie together the line of text that the object is saying.

    For example, I have 3 lines of text for testobject, so I called them "testobject2", "testobject1" and "testobject0". When the playber collides with testobject, I set a variable (Objects.numFalas) to 2, so when the text is written, it looks for the "testoject2" in the dictionary file and returns it. I think it would work but I can't seem to tie together these 2 pieces using &, am I missing something?

    Also, I understand this is not the best way to do it (probably) but I got even more confused by using arrays and such.

  • I think you want

    Dictionary.Get(Objects.AnimationName & Objects.numFalas)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That was it! Thanks a bunch!

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