Hello, I have the following problem.
I have a sprite with many instances.
The instances have the Instant variables spriteX spriteY and status
The instances are arranged as a matrix (array) in the layout and their place in the matrix saved
in the instant variables spriteX and spriteY
Under certain conditions i want to transferred the status from one sprite instance to its neighbor.
Example
Instance No 14 has spriteX = 2 and spriteY = 4 and Status = 2
If the instance with spriteX = 2 and spriteY = 3 have status = 5 (the "northern neighbor"), then the above-described Instance No 14 also get the status = 5
Analog is then compared to see whether one of the other 3 neighbors (to the east, south and west) has the status = 5.
If minimum one of neighbor have status = 5 the first Instance No 14 get status = 5
How this represents in Construct2 code?
I've tried a lot, but no attempt was completely successful.
Thanks for the help.
Franzl