Using the & in expressions

Get help using Construct 2

Post » Fri Jan 18, 2013 9:35 pm

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:



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.andreyin2013-01-18 21:39:32
B
106
S
35
G
37
Posts: 798
Reputation: 25,215

Post » Fri Jan 18, 2013 10:15 pm

I think you want
Dictionary.Get(Objects.AnimationName & Objects.numFalas)
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Fri Jan 18, 2013 11:26 pm

That was it! Thanks a bunch!
B
106
S
35
G
37
Posts: 798
Reputation: 25,215


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 25 guests