Adding values to arrays

Get help using Construct 2

Post » Tue Nov 27, 2012 5:39 pm

Hi

Have a probably simple question regarding arrays, as i started looking at them and how to use them.

So i read the manual part about it and some tutorials about how to add values to them. But no matter what i do, i cant seem to get anything but 0's out of it. Even when i try other peoples examples of how they did it, when trying to help someone else, there examples still just return 0.

So maybe someone can explain it for me.

I made a 1 dim array with 10 width.

I use:
for each X element
- Array | Array set value at Array.CurX to 1
- Text | Append Array.At(Array.CurValue)

It returns 0 for all.

I have also tried using CurX in the append text, but it still returns 0.

Anyone know what im doing wrong?






nimos1002012-11-27 17:40:54
B
40
S
10
G
2
Posts: 1,151
Reputation: 6,501

Post » Tue Nov 27, 2012 5:42 pm

Try:

Text | Append str(Array.At(Array.CurValue))
Because I think you can't append numbers
B
83
S
21
G
15
Posts: 1,039
Reputation: 15,134

Post » Tue Nov 27, 2012 5:49 pm

i just tried it, but it stills just return 0 :(
B
40
S
10
G
2
Posts: 1,151
Reputation: 6,501

Post » Tue Nov 27, 2012 9:08 pm

For those that cares.

The first example i did in the beta release r110, and couldnt get it to work.

I now downloaded the lastest stable version r108.somthing i think. And now it works.

So guess there might be a bug in the beta release or something.
B
40
S
10
G
2
Posts: 1,151
Reputation: 6,501

Post » Tue Nov 27, 2012 9:49 pm

@nimos100

did you tried beta 110.2, there were some trouble with 110
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], jeffige, Mallets and 27 guests