Hi Gang,
I’m trying to use the set Tile At block to randomly place some collectible tiles across a level, but sometimes it won’t place the selected tile unless I’ve previously placed it onto the tilemap.
The work around is adding, saving and then removing the tile from the tilemap but that seems iffy at best. Am I missing something?
The code is here .
What’s happening to you is a known bug.
I know it’s on Github somewhere…
EDIT: Here was my post encountering the same issue
WOW! That game is awesome!
You have found a bug! I’ve opened an issue for it here: https://github.com/microsoft/pxt-arcade/issues/1737
Basically, the issue is that the open chest tile doesn’t appear anywhere in the tilemap.
You can work around it by opening your tilemap, adding an open chest, and closing the tilemap editor. You can probably even delete the open chest from the map after is has been added at least once.
Here’s the Github issue:
opened 12:04AM - 05 Feb 20 UTC
closed 04:01AM - 12 Feb 20 UTC
bug
p2
tilemap
If you call `set tile at` on a tilemap and pass a tile that is not in the tilese… t for that specific map, the operation will be ignored. Here is a program that demonstrates the issue:
https://makecode.com/_3bmewvhzihqx
The second tilemap does not have the light-green flowers in it, so the call to `set tile at` does nothing.
Although it has seemed to have been fixed in a recent version of MakeCode Arcade.
2 Likes