Array: Fields are always set to "0"?

Get help using Construct 2

Post » Sun Apr 29, 2012 3:40 pm

Hi all,

I have started with a new game and for this, I need to create a dynamic map.

I have set up an array and initiated this event: set size to (x,y,1)
x and y are variables that are set to a random value from 10 to 100 one step before.

To get sure that the value is set, I have checked the value by a text component.

To fill the array I have set up 2 repeat conditions (first for x and a sub-event for y).



When I run this, every single cell is filled with a 0 instead of 1 to 3... any ideas why?
B
43
S
10
G
7
Posts: 437
Reputation: 5,923

Post » Sun Apr 29, 2012 6:32 pm

Events look OK, maybe you could share your .capx?
Scirra Founder
B
373
S
218
G
83
Posts: 23,435
Reputation: 185,840

Post » Sun Apr 29, 2012 7:02 pm

I got rid of all the additional plugins and made the same with standard tools, unfortunately still the same problem.

Attached capxUbivis2012-04-29 19:02:37
B
43
S
10
G
7
Posts: 437
Reputation: 5,923

Post » Sun Apr 29, 2012 7:37 pm

It's this bug: http://www.scirra.com/forum/adding-array-with-no-properties-in-r76_topic48444.html

If you add an array to the project while viewing the event sheet the array is created with no properties.ramones2012-04-29 19:38:11
B
55
S
28
G
18
Posts: 1,520
Reputation: 25,285

Post » Sun Apr 29, 2012 7:45 pm

duh'... many thanks... this solved it :)
B
43
S
10
G
7
Posts: 437
Reputation: 5,923


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], mmercerc and 10 guests