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
124
S
43
G
41
Posts: 849
Reputation: 28,235

Post » Fri Jan 18, 2013 10:15 pm

I think you want
Dictionary.Get(Objects.AnimationName & Objects.numFalas)
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,650

Post » Fri Jan 18, 2013 11:26 pm

That was it! Thanks a bunch!
B
124
S
43
G
41
Posts: 849
Reputation: 28,235


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 47 guests