Flower Trail
Introduction
Leave a trail of flowers everywhere you go.
Are you walking?
Get ||player:on player walk||
and put it into the workspace.
player.onTravelled(WALK, function () {
})
Place a flower
Get a ||blocks:place||
and put it inside ||player:on player walk||
. Change the Grass
block to Dandelion
in the choices for blocks.
The numbers (~0 ~0 ~0) mean the flower will be placed at your current position. So, every position you walk to gets a flower.
player.onTravelled(WALK, function () {
blocks.place(YELLOW_FLOWER, pos(0, 0, 0))
})
More flowers!
Let’s have more flowers! Add in another ||blocks:place||
and put it just below the other one. Change its Grass
block to an Oxeye Daisy
.
player.onTravelled(WALK, function () {
blocks.place(YELLOW_FLOWER, pos(0, 0, 0))
blocks.place(OXEYE_DAISY, pos(0, 0, 0))
})
Start walking!
Go to Minecraft and start walking for a second or two. Turn around and look at your flower trail. If you walk backward, you can watch the flowers pop from the ground as you move.
One more flower
Now that’s very nice, but it would be fun to place a whole bouqeut while you walk! Copy one of the ||blocks:place||
and insert that copy into ||player:on player walk||
. Change the flower in the new block to different one that you like.
player.onTravelled(WALK, function () {
blocks.place(YELLOW_FLOWER, pos(0, 0, 0))
blocks.place(OXEYE_DAISY, pos(0, 0, 0))
blocks.place(POPPY, pos(0, 0, 0))
})
Try it again
Go back into Minecraft and see what your trail looks like now.
Make rows of flowers
In the first ||blocks:place||
, change the first 0
for the position to 1
. In the third ||blocks:place||
, change its first 0
for position to -1
. Now you will place the flowers in rows!
player.onTravelled(WALK, function () {
blocks.place(YELLOW_FLOWER, pos(1, 0, 0))
blocks.place(OXEYE_DAISY, pos(0, 0, 0))
blocks.place(POPPY, pos(-1, 0, 0))
})
Try the chat command!
Go to Minecraft now and make rows of flowers everywhere!