Get a value from an array

New releases and general discussions.

Post » Sat Mar 12, 2016 9:59 am

I've noticed that there's no way of getting a certain value in an array. There are expressions like CurrentX, but there doesn't seem to be a way to set which X to read from. Unless I use a "For each element" CurrentX always stays at 1. There are also the (x), (y) and (z) expressions, but it tells me I can't use them. So what are they for? So, is there a way to read from a certain element in the array without having to use a loop?

------------------------------------

Also, on an off-topic note: It seems to me that the Construct Classic section has pretty much died out. I don't get it. Classic still has appeal, being Open-Source and still being able to do a lot more than one might think. Also, I don't want to move over to Construct, because 100 events are not enough for a full-fledged game and I can't afford the unlimited Paid version. :/
B
4
S
1
Posts: 13
Reputation: 376

Post » Sat Mar 12, 2016 10:43 am

BioMechanical wrote:Also, on an off-topic note: It seems to me that the Construct Classic section has pretty much died out. I don't get it. Classic still has appeal, being Open-Source and still being able to do a lot more than one might think. Also, I don't want to move over to Construct, because 100 events are not enough for a full-fledged game and I can't afford the unlimited Paid version. :/


I agree that CC is still quite useful, but as many of the long term users found out, the bugs can be a killer.

As active development stopped a long time ago, and new development is reliant upon a propriety piece of software (for the editor not the runtime), it is a shame, but understandable, that it is slowly but surely wandering off in to the sunset.

The following post from R0J0hound summarises the development requirements brilliantly:
https://www.scirra.com/forum/more-freaking-span-class-posthilit-runtime-span-errors_p1021037?#p1021037
If your vision so exceeds your ability, then look to something closer.
Moderator
B
132
S
30
G
81
Posts: 5,329
Reputation: 56,757

Post » Sat Mar 12, 2016 2:18 pm

I haven't encountered any bugs yet, aside from the program crashing, when I was installing new software, but I understand if they turn people off. I do wonder, though, how did people, who can't afford Construct 2 moved from this to the limited trial version? Or have they stopped using Construct entirely?

Also, any solutions to the array issue???
B
4
S
1
Posts: 13
Reputation: 376

Post » Sat Mar 12, 2016 6:56 pm

@BioMechanical
The three ways to access values values are the following. Also they are the same expressions given when you select them from the expression list.
Array(x)
Array(x,y)
Array(x,y,z)

To use them replace x,y and z with a value. Also keep in mind the indexes start at 1 not 0.

So to get the first value of an array you'd use:
Array(1)

For the second:
Array(2)

and so on...
B
91
S
31
G
103
Posts: 5,241
Reputation: 67,768

Post » Sun Mar 13, 2016 5:22 pm

Ah, thank you! :)
B
4
S
1
Posts: 13
Reputation: 376


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 0 guests