is there anyway to make each tilemap that’s connected be randomly generated?
@CodeOnTheCob that’s because you copy+pasted the blocks. tilemaps copy by reference, so each of the three blocks is pointing to the same tilemap underneath. you can fix this by either selecting a different tilemap in the “my assets” tab of the tilemap editor or by dragging a new block out of the toolbox instead of copy/pasting
@Ima.notarobot nope! that’s kind of the whole reason for this extension. you should be able to use as many tilemaps as you like
@zef sure! this extension doesn’t do random map generation, though; you’ll have to code that yourself. the argument that’s passed to the set overworld block is simply a double array of tilemaps, so you can make your own tilemaps and put them in an array. here’s a dumb little example that generates a bunch of very boring random tilemaps: https://makecode.com/_0o5LiK1Lc97k
ok thank you
please can you explain each block?
right click on the block and select “help” to get a help page that explains the block
thankyou
Hey @richard ! I’ve been working on a tech-demo for the over world extension (can’t spoil the surprise yet) but i was wondering how exactly you expand the tilemap grid because i’ve very quickly ran outta space.
@JtSpeedRun if you ran out of space in the grid block, you’ll have to switch to arrays! the grid block is just a fancy wrapper around arrays; in other words, these two are equivalent:
the only annoying thing about arrays is that the rows will start stacking vertically once you go past three maps; sorry about that! maybe i’ll add a block for joining two overworld grid blocks to avoid using arrays…
Ok, thanks!
Anyway to place sprites in specific tilemaps I’ve been trying to but I cant seem to get it to work here’s the game link if you need it https://arcade.makecode.com/S58395-44056-11566-24976
@zef you can’t spawn sprites on unloaded tilemaps like that
instead you want to do something like this:
you create the sprite when the tilemap is loaded. the destroy at the top makes it so that all sprites of the current tilemap are cleaned up when the next one loads
thanks @richard! I haven’t done a lot of advanced coding so most blocks are pretty confusing.
I am using the overworld extension in conjunction with extra effects, and I am wondering how to get rid of effects when I transition to a different tile map. @Luke suggested that starting another effect at the same location with -1 duration would work? I didn’t want to do this code till I got confirmation that it worked because… you know, laziness.
@BotWarrior that’s a question for the creator of the extra effects extension
works for red line