Checking Array Values

Get help using Construct 2

Post » Mon Jun 05, 2017 7:38 pm

Good evening people,

i was wondering if someone could possible help me, i'm trying to run an array loop which sets a variable to the number of words in array which match but the way I've got it don't work properly and i don't like it. it seems unreliable heres an image http://imgur.com/SpzFL4O

can anyone help me please
B
19
S
6
Posts: 143
Reputation: 1,835

Post » Tue Jun 06, 2017 9:24 am

@darkrealos Is this what you're after?:

https://www.dropbox.com/s/6i6vf8f16wfnp ... .capx?dl=0

I've added the function setArray for testing purposes.

Tap the spacebar to trigger setArray, which resets the array, and then ResourceUpdates, which counts up the number of "ForestryHuts" in the array. No need for the ResourceBuildingCheck variable.
B
22
S
9
G
4
Posts: 476
Reputation: 4,327

Post » Tue Jun 06, 2017 10:50 pm

i think that is exactly what i want, let me try add it to my game and let you know

checked it and it works exactly how i wanted it to :) thanks a ton man,

arrays are defiantly something i struggle with
B
19
S
6
Posts: 143
Reputation: 1,835

Post » Wed Jun 07, 2017 6:58 am

Cool, glad to be of help :)
B
22
S
9
G
4
Posts: 476
Reputation: 4,327

Post » Thu Jun 29, 2017 3:20 pm

hey sorry for the late reply managed to do exactly what i wanted thanks alot :)
B
19
S
6
Posts: 143
Reputation: 1,835

Post » Sun Jul 02, 2017 9:55 am

No worries ;)
B
22
S
9
G
4
Posts: 476
Reputation: 4,327


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests