AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Gamemaker studio 2 change instance layer10/25/2022 ![]() There's not much I can do about that so please bear in mind that you will still need to go back and edit the values of the gradients for any previous edits. if the bottom corners were dark, they are going to be much more darker due to the change of layers). The layer for the armor has also been edited and the bottom corners will have the bottom palette much more concentrated (i.e. #Gamemaker studio 2 change instance layer codeThe latter is why this is temporary code because if you do want to make the four new layers all black but not everything else, this will not be accepted by the code unless you, at minimum, use a very marginal amount of light in at least one corner of one layer ![]() This isn't a 100% solution as the gradients are also being taken as is and the way it detects if they have not been edited is if all four layers are completely black. Temporary code has been added to detect if the new layers have not been edited and take the appropriate colors from the old palette. With this in mind, these layers are being added in a way that simply overlaps on top of the old layers. #Gamemaker studio 2 change instance layer updateI'm sure you would prefer not to have them lost in the update and have to start all over again. You need to supply the layer ID, which can either be the name of the layer as written in the code editor (as a string) or the actual layer ID value as returned by the layercreate(), and note that you can only deactivate instance layers with this function. One thing to note is for those who have already made custom colors for Enro. With this function you can deactivate all instances assigned to a specific layer. Enro has code for every instance required to draw him, and I had to go into every single one of these instances and update the code manually. I figured that since these were unique instances, unique code was required for each situation. What draws the sprites during gameplay is not the same for the sprites in the color editor. I'm sure there is a way to actually optimize a single script to work on all of them but the reason why I opted to use unique blocks of code for each instance is due to the way each instance is coded. ![]() ![]() There are so far 5 different instances where the layers come into play and have to be drawn. The code is not universal as different instances require different code when they are drawing sprites. I decided that the last four layers will be the straps on his armor, the mid-section (which my concept artist originally intended to be a plate of some kind), his shirt, and his skirt.Īfter that was done, I had to update the code next. ![]()
0 Comments
Read More
Leave a Reply. |