Wow. I’m (almost) 15 years old.
I am of Hispanic descent too, and haven’t learned full Spanish!!
I AM AWESOMEEEEE!!
Hi, everyone!
I’m currently attempting to make a first level in the game, and am working on destroyable/deleteable tiles (such as collecting a coin or destroying a block). Each level is split into several rooms where new tiles are loaded, but every time I destroy a coin or a block, for example, once I leave the room and come back, the tile returns.
How can I make it so that the game remembers that those tiles are destroyed or deleted? I wanted to put a sprite on each location of the tiles to handle it that way, but I feel as if that will make the game lag too much.
Thanks in advance!
That’s what I tried to do too. Maybe use a variable? Or settings blocks? Or maybe make it so that the other room is on the same tile map as the main just put it far away and when the player hits the door he gets placed on that rooom. Then you won’t have to destroy or modify the tile map.
you could do what pizza tower did : a list
basically make a list of every destroyed tile position like
x,y
100,10
150,25
etc.
then when you re-enter the game will delete the tiles on those locations.
make sure to do that before you create the sprites. since the tiles were removed in the previous script, there will be no tiles to check in the current script.
Can you provide an example?
lets say you got a coin at x 80 and y 8
the position will get added to a list, and once you re-enter the room the game will run a script that removes those tiles
so the coin at x 80 and y 8 will be gone
how that script works is it divides the x and y by 8 and deletes the tile at that tile location, and when the next script is ran there are no tiles with the coin sprite so no coins are generated.
i can make a game for this if you still dont get it
I tried to create some code for this but I still don’t get it.
Please Make it
Can someone please tell me why this code would not work?
Basically, when the player collects a coin (which is a tile,) the tile is deleted and two values named “coinvalueX” and “coinvalueY” respectively are set to the tile’s x and y values. Then, when the player enters a different room and comes back, this function is loaded to remove the tile.
However, this does NOT work, and I don’t know how to fix it.
Simple! You used ‘value’ twice. It keeps being redefined!
Ahhhh I see. You have one value number. Let’s say it’s 5y. You check if it’s the y coordinate. It is! But… you are using the same value for your x coordinate. So if x is 10 then it will not delete the x position.
So, to summaries, you basically need value1 = x? And then value2 = y?
Also why am I suddenly @richard
Ya you just gotta rename it to like value2313 or smthing
I was here longer than rhe new users and yet i feel like an idiot
I tried to create a “value1” and “value2” variable from the original “value” variable and it STILL didn’t work.
Drop the new value variable into the for element block
It gives me an error if I do that.
Should I be dragging the variable into the first “for element value,” the second, or both of them? I’m calling this function in a different function that sets the tilemaps for each room, and in an “on sprite of kind X overlaps tile at location” block that changes the “room” variable, if that needs to be disclosed.
I don’t think you need to define what value 1 is
I meant two variables. Or you could try this: make all the maps in a world in a single tile map. Just reeeeaaaly far away from each other. Then no need to do anything else.
Pull that value1 block out of the loop, and instead right click the value
parameter. It should let you choose which variable to use then
Welp, my finals are done and my school year is over.
That means…
WOAH
New stuff coming soon! Turtle Tops and a playable Pixeldoodle are in the works, along with some moveset changes. Stay tuned!
Also have this big drawing of testing Coneguy’s expressions. It was made on this website, if you wanted to know.