- Mar 8, 2021
- Reaction score
- First Language
- Primarily Uses
or i can just use it as normal variable and set some value...You can do that, but be aware that if the player can access the save menu and tries to save the game, the game will crash and the save file will become corrupted, so it gets auto-deleted.
To avoid this, you have to dispose the sprite you assigned to that variable and set the variable to something that is compatible with the Marshal.dump method (it can be a simple nil or false).
Also, having the sprite on screen when the player opens the menu (or changes the scene in any other way) will make the image disappear once the scene is back to the map, but that doesn't mean that the variable is cleared, so it will still hold that sprite.
anyway - that game have no save... etc.
for some reason it did not workIn short, you can't just create sprites all over the place, you have to make sure that they are properly disposed when you are done with them or you will get into a lot of issues.
If you get the disposal issue out of the way, here is how you can set the image above/below other things:
Just change the value to higher/lower (by +/-50 at a time) to see where it gets placed.Code:
$game_variables.z = 50
I managed to find out that with a value of Z = -1 the picture is drawn under the tiles, and for any values above it - drawn above the character.