Before updating to Windows 10 you may need to return your Pro license. More information here

Looping through array to find a specific class?

I have an array of a class witch is called Block. The block class two variables: position(witch is a Vector3) and type(String). In my script I assign the position and type through a for loop. When I run the script it creates an array of 9 "Blocks". My next step is to make each Block of the array check if there are any blocks around it with the type of "dirt", but after an hour of trying I ended up with nothing. Could anyone help be do this? I think I need a for loop that checks if a block is at a specific position and has a specific type.

more ▼

asked Apr 28, 2012 at 08:17 PM

avatar image

44 85 63 66

(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments



asked: Apr 28, 2012 at 08:17 PM

Seen: 939 times

Last Updated: Apr 28, 2012 at 08:30 PM