Scirra / Construct-feature-requests

A place to submit feature requests and suggestions for Construct.
https://www.construct.net
10 stars 1 forks source link

Array expressions: Elements #272

Open XHXIAIEIN opened 3 months ago

XHXIAIEIN commented 3 months ago

Reviewed guidelines

Checked for duplicate suggestions

Summary

This 'Elements' property indicates the total number of elements in the array. It is read in the editor and does not appear in the Array expression.

image

Possible workarounds or alternatives

It need some boring math to calculate it, which is boring and a waste. because, "nothing is free". Since it is already accessible inside the engine, it would be more convenient to make it public.

Proposed solution

Getting the number of elements in an array means that we can operate the array as needed, such as using advanced random to generate the length of the array and then randomly selecting a cell.

Why is this idea important?

Expanded the functionality of Array to make it more useful.

Additional remarks

No response

WilsonPercival commented 3 months ago

issue272.zip