franzl34's Recent Forum Activity

  • 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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
franzl34's avatar

franzl34

Member since 16 Mar, 2012

None one is following franzl34 yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies