akshay
1
Hi,
I am trying to create array attributes.
There are two problems,
I) I added the numbers in order 600, 1000, 300 but visually it is as shown below. However I get it properly ordered in code.

II) How do I declare array of numbers? This is how I see in the inspector.

Code:
Test.attributes.add(‘step_delays’, {
type: ‘number’,
array: true
});
Thanks.
Martin
2
hey akshay,
I think you have to wait a bit to be able to use number arrays, as its not implemented yet.
Max wrote about it a couple of days ago in another thread:
http://forum.playcanvas.com/t/new-script-attributes-array-true/2291/2?u=martin
A tmp solution might be to use the string set and convert it into an internal number array in your initialize function.
Greetings,
Martin
2 Likes