Stuck on Setting Tiles in Run time

posted in davidkilmer
Published August 16, 2019 Imported
Advertisement

I am now stuck on why I can’t seem to change the tiles during run time, which is in theory, something that should be able to occur , but seems to be a little more difficult , or at least was at one point for people using the brand new Tilemap construct.

So, it is now solved. Yeah, nothing a few hours of work will do at 3am. I noticed in the base terrain generator that even though I serialized the tilemaps and tilebases, I still loaded them in via GetComponant , which, gee, is starting to become a repeating factor in my issues. Yes, it only took a quick hour to figure this out, and all I did was put the highlighter in its own map and write the few lines of code, before I realized I wasn’t serializing the componants and instead loading them, it dawned on me, references that are passed between scripts will and can be blank. Sooooooo, either you are instantiating them, or loading them. Duh. Of course, the player might be an exception to this, and maybe other static objects. In this case, this game, the player is static. He can be loaded with the scene, since it is rogue like, there is really no point in loading him in ( which you would think is a good reason to not prefab the player object, but you would be mistaken there too…. i mean, what if you delete the object? ).

tile_change_berth.gifThe highlighter is showing the attack squares, the one the player is on and the one in front of him, since presumably, he is attacking unarmed.

Now, back to the combat manager!


View the full article

Next Entry Combat System Berth
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement