Use loop "for" with start index = 0, end index =2. Change the value (from highlighted) into 13+loopindex
If you have fixed amount of pipes, that would be hard to create random pipes formation since you can't be sure if it can make correct connection to desired goal. I suggest you plot the valid pipe connection pattern first then randomize the rotation for all pipes on the game start.
Develop games in your browser. Powerful, performant & highly capable.
For swapping/replacing part I have an example on following topic:
And code to make pipe rotate:
The rest would be utilizing flood-fill:
My example for local storage;
this: https://www.dropbox.com/s/0wt9pdcfay3rz ... .capx?dl=0
and
that: https://www.dropbox.com/s/vh3n39sk8z2dh ... .capx?dl=0
After adding mouse object;
on object clicked >> Set instance variable (value) to "object UID"
—
Ah yes, here it is: https://www.dropbox.com/s/g18npbnjapwpe ... .capx?dl=0
Trimmed version (single frame animation): https://www.dropbox.com/s/q8de9p0c5dpy8 ... .capx?dl=0
Jump after the edge >> https://www.dropbox.com/home/Public?pre ... slope.capx
If you need that kind puzzle example, I had the capx: https://www.dropbox.com/s/qpkumscq1t7y9 ... .capx?dl=0
MPPlantOfficial the capx is available to download, online demo is not. Be sure download the attachment. It works.
Non overlapping block generator:
Auto push using family:
Oops! Here you can : https://www.dropbox.com/s/soiw3brxi0qk8 ... .capx?dl=0
Dice Rolls Dude — Now for sale in the Scirra Store!
https://www.scirra.com/store/royalty-free-game-templates/dice-rolls-dude-3413
<p>Features: </p>
Use this topic to leave comments, ask questions and talk about Dice Rolls Dude
See my jigsaw example, for lining/queuing objects :
Behavior shared across instances for that object type. And yes you can create family with only an object type and applied family behavior. There is no wrong to do that way as long the performance still run good.
Straight example:
viewtopic.php?f=147&t=123161&p=876813#p876813
Other example for auto adjust line thickness:
https://www.dropbox.com/s/glhoiswi4vc4r ... .capx?dl=0