x


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

vipvex gravatar image

vipvex
44 85 62 65

(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

By RSS:

Answers

Answers and Comments

Topics:

x2227
x1558
x189
x155
x73

asked: Apr 28, 2012 at 08:17 PM

Seen: 931 times

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