- Joined
- Dec 12, 2020
- Messages
- 36
- Reaction score
- 14
- First Language
- king's english
- Primarily Uses
- RMMV
Salve, fellow makers!
Behold the following snippet:

Based on the first function, Scene_Map.prototype.createDisplayObjects, it is my belief that this.createWindowLayer (and therefore this.createRewardsLayer) should be executed before this.createTreasureChestSprites.
However, upon execution, this happens:

As you can see in the console output- 0, 4, and the error- it appears as if this.createTreasureChestSprites is being executed before this.createWindowLayer (and therefore this.createRewardsLayer).
Now, I know how to "fix" this problem (by moving the createTreasureChestSprites command to createWindowLayer), but I am just wondering if anybody can explain to me why the command execution sequence isn't occurring in the order that I think it should?
Bonus question: how do I remedy the two SourceMap errors?
Thanks for the knowledge!
Behold the following snippet:

Based on the first function, Scene_Map.prototype.createDisplayObjects, it is my belief that this.createWindowLayer (and therefore this.createRewardsLayer) should be executed before this.createTreasureChestSprites.
However, upon execution, this happens:

As you can see in the console output- 0, 4, and the error- it appears as if this.createTreasureChestSprites is being executed before this.createWindowLayer (and therefore this.createRewardsLayer).
Now, I know how to "fix" this problem (by moving the createTreasureChestSprites command to createWindowLayer), but I am just wondering if anybody can explain to me why the command execution sequence isn't occurring in the order that I think it should?
Bonus question: how do I remedy the two SourceMap errors?
Thanks for the knowledge!