Help: onBlockPlaced position

Hi,

Anyone who knows if there is a way to get the position of the aim/sight or the position of the last block placed in MakeCode for Minecraft?

I am trying to get something to happen around the position of the last block placed OR wherever the sight aims, using the onBlockPlaced funcition block.

You will have to use a variable (or two for x and y) to keep track of the last block placed and update it every time you place a block

1 Like

Thank you @WoofWoof for your reply!

I’ve been struggling lately with some UWP loopback issue, which suddenly and temporarily cut me off from coding in Minecraft; https://www.mysysadmintips.com/windows/clients/912-windows-10-uwp-apps-can-t-connect-to-local-ip-loopback-restriction

However, I am hopefully soon back to learn more MakeCode coding inside Minecraft.

Would you happen to know which command block I would use to get the “last block placed” position to put into this variable, or maybe also, which command block to get the position which the player’s crosshair points to when I need that position?